Results 1 to 1 of 1

Math Help - Get the end position of a spherical segment line.

  1. #1
    Newbie
    Joined
    Jul 2012
    From
    USA
    Posts
    1

    Get the end position of a spherical segment line.

    I just want to say: This is my first time here and I haven't taken trig just yet, so bar with me a bit.

    Hey guys, I been trying at this problem for a few days now, but to no luck. I am taking a spherical object that is using a heading, pitch, roll type movement and trying to cast a line segment from it and then get the end point of that line segement. Can anyone show me the math behinde it?

    I know it's wrong, but here's what I did try:
    Code:
    from math import cos, sqrt, tan, sin, radians, degrees
    x1 = 0
    y1 = 0
    z1 = 0
    P = 90
    H = 0
    R = 0
    D = 10
    x2 = round(degrees(sin(radians(H)) * cos(radians(P)))) * D + x1
    y2 = round(degrees(sin(radians(H)) * sin(radians(P)))) * D + y1
    z2 = round(degrees(cos(radians(H)))) * D + z1
    print x2, y2, z2
    I was using the math I saw here: Spherical coordinate system - Wikipedia, the free encyclopedia Someone pointed me to this link to help solve the issue from ##Math.

    Hope it's ok that is it is in programing code. Should still be readable in anycase. (D)istance I want to move in from the position of where the spherical object is looking at using (P)itch and (H)eading. As for roll we can leave at as 0.
    Last edited by Mradr; July 17th 2012 at 03:56 AM.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Moment of inertia of a spherical segment
    Posted in the Calculus Forum
    Replies: 5
    Last Post: September 1st 2010, 04:28 AM
  2. line segment
    Posted in the Geometry Forum
    Replies: 2
    Last Post: December 1st 2009, 03:47 PM
  3. Replies: 1
    Last Post: September 5th 2009, 05:46 PM
  4. Line Segment
    Posted in the Geometry Forum
    Replies: 2
    Last Post: December 22nd 2008, 05:26 AM
  5. Line Integrals Across Line Segment
    Posted in the Calculus Forum
    Replies: 1
    Last Post: December 3rd 2008, 12:19 PM

Search Tags


/mathhelpforum @mathhelpforum