Point At Given Distance in 3d Space

  • Thread starter Thread starter Sothh
  • Start date Start date
  • Tags Tags
    3d Point Space
AI Thread Summary
To calculate the 3D point hit by a ray given a starting point (0,0,0), a direction represented by spherical coordinates (0,90), and a distance ranging from 1 to 100, one must first convert the spherical coordinates into Cartesian coordinates. The direction (0,90) indicates a ray pointing along the positive x-axis. The resulting 3D point can be calculated using the formula (distance * cos(longitude) * sin(latitude), distance * sin(longitude) * sin(latitude), distance * cos(latitude)). For the specified direction and distance, the points would be (x, 0, 0) where x is the distance from 1 to 100. This method allows for straightforward implementation in code without complex mathematical notation.
Sothh
Messages
11
Reaction score
0
I am working on a simple ray tracer for rending point clouds in real time.

I am not so good with maths, and I am stuck with a fairly simple problem:

Given a start point (0,0,0) and a direction (0,90) and a distance 1-100, how do I get the 3d point the line will hit?

As this will go directly into code, it will be easier for me to use if no special math characters are used. (And easier for me to understand :)

Thanks!
 
Mathematics news on Phys.org
You have the origin in three dimensions, but I am not sure what "direction(0, 90)" means. Is that in "spherical coordinates" with \theta] (the &quot;longitude&quot;) equal to 0 and \phi (the &quot;co-latitude&quot;) so that is directed toward the positive x- axis? But then what &quot;third point&quot; are you talking about? You have only mentioned one point, the origin. And what do you mean by &quot;a distance 1-100&quot;? A distance is a single number.<br /> <br /> If you mean &quot;the point at distance 1 from the origin in the direction of the positive x-axis&quot;, that is, of course, (1, 0, 0). If you mean the point at distance 100 from the origin in that direction, that is (100, 0, 0). If you mean some point at distance x, where x is between 1 and 100, from the origin in that direction, that is (x, 0, 0).
 
Sorry, the direction is the longitude and latitude, or pitch and yaw.

1-100 is a single number, that may range between 1 to 100 (or more.)

I need the algorithm to find the 3d point that the line ends at when given a starting point, a direction, and a distance from the starting point.
 
This document might help if you can work in Cartesian, Vector, or Parameter Forms of 3D Equations for Lines and Planes
https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B8eDe0O_ATL_NjRjZDViOWUtZjk4NS00OTQyLThkODUtNDEzOWUzNTFhMmQ4&hl=en_US
 
Last edited by a moderator:
Seemingly by some mathematical coincidence, a hexagon of sides 2,2,7,7, 11, and 11 can be inscribed in a circle of radius 7. The other day I saw a math problem on line, which they said came from a Polish Olympiad, where you compute the length x of the 3rd side which is the same as the radius, so that the sides of length 2,x, and 11 are inscribed on the arc of a semi-circle. The law of cosines applied twice gives the answer for x of exactly 7, but the arithmetic is so complex that the...
Is it possible to arrange six pencils such that each one touches the other five? If so, how? This is an adaption of a Martin Gardner puzzle only I changed it from cigarettes to pencils and left out the clues because PF folks don’t need clues. From the book “My Best Mathematical and Logic Puzzles”. Dover, 1994.
Thread 'Imaginary Pythagoras'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...
Back
Top