Jump to content
  • Advertisement
Sign in to follow this  

Point along a 3d line segment at a given y value

This topic is 4337 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi Guys, I'm now really regretting thinking the phrase "i'll never need this stuff so i won't bother learning it" - well Mrs Gallagher from St. Laurence Secondary school, if you read this I was wrong you were right! Anyhow, given a 3d line segment P1, P2, how do I find the point along that line at a particular y value (this is bringing back memories of the straight line equation etc) but i was just wondering whether someone could save me the time of trudging through my dog eared high school math book? Any help would be really appreciated. Kind Regards, Chris

Share this post


Link to post
Share on other sites
Advertisement
P1+(P2-P1)*(y-P1.y)/(P2.y-P1.y) I think. Check to make sure...it's a little early for me.

Note that there is no reason that a point on that line segment should exist with that y-value. In particular, things get ugly if the line has no component in the y-direction. Check for this things beforehand.

Share this post


Link to post
Share on other sites
OT: are they called High Schools in England as well now? Blimey, do you have prom queens too?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!