It says Sphere in the title but I actually meant Cylinder (Ive been working on it a few hours and brains gone numb). The problem is to do with an algorithm for a game im making in openGL. I need the points of intersect of a vector (O+Dt) and a cylinder with radius r, direction A and point on the cylinder core B (we can assume infinite height).(adsbygoogle = window.adsbygoogle || []).push({});

So far I had the following

[itex]| (O + D . t1) - (A + B . t2 ) | = r[/itex]

and

[itex]B . ( (O + D . t1) - (A + B . t2 ) ) = 0[/itex]

and then tried to solve it, but the equation became quite long and I likely made an error along the way.

Does anyone have an easier way of solving it, or has anyone solved it before?

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Arbitrary vector intersect sphere

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads - Arbitrary vector intersect | Date |
---|---|

I Integrate a function over a closed circle-like contour around an arbitrary point on a torus | Yesterday at 12:51 PM |

I Can we remove the arbitrary function? | Oct 29, 2016 |

I Determining the flux of an arbitrary vector function | Oct 23, 2016 |

Converting arbitrary Cartesian vector to cylindrical | Jan 19, 2015 |

Dot product between grad f and an arbitrary vector | Aug 17, 2008 |

**Physics Forums - The Fusion of Science and Community**