Insights Blog
-- Browse All Articles --
Physics Articles
Physics Tutorials
Physics Guides
Physics FAQ
Math Articles
Math Tutorials
Math Guides
Math FAQ
Education Articles
Education Guides
Bio/Chem Articles
Technology Guides
Computer Science Tutorials
Forums
General Math
Calculus
Differential Equations
Topology and Analysis
Linear and Abstract Algebra
Differential Geometry
Set Theory, Logic, Probability, Statistics
MATLAB, Maple, Mathematica, LaTeX
Trending
Featured Threads
Log in
Register
What's new
Search
Search
Search titles only
By:
General Math
Calculus
Differential Equations
Topology and Analysis
Linear and Abstract Algebra
Differential Geometry
Set Theory, Logic, Probability, Statistics
MATLAB, Maple, Mathematica, LaTeX
Menu
Log in
Register
Navigation
More options
Contact us
Close Menu
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Forums
Mathematics
General Math
Intersection between line and cylinder
Reply to thread
Message
[QUOTE="Joacim Jacobsen, post: 5788501, member: 625883"] I have an expression for a "line- to sphere intersection" that works: a = 1 + Ax^2 + Ay^2 b = 2*(-zs + Ax*(Bx-xs) + Ay*(By-ys)) c = zs^2 + (Bx-xs)^2 + (By - ys)^2 - R^2 This is part of a code in Matlab, and works fine. It is derived from substituting (x=Ax*z+Bx, y=Ay*z+By) into: ((x-xs)^2+(y-ys)^2+(z-zs)^2 = R I am now trying to do the same for a cylinder, by substituting(x=Ax*z+Bx, y=Ay*z+By) into: (x-xs)^2+(y-ys)^2 = R Ending up with: a = Ax^2+Ay^2; b = 2*Ax*Bx - 2*Ax*xs + 2*Ay*By - 2*Ay*ys; c = -2*Bx*xs - 2*By*ys + Bx^2 + By^2 + xs^2+ys^2 - R^2; This doesn't seem to work. Can anyone tell me if something seems off with the math or logic? Any comments at all would be greatly appreciated. [/QUOTE]
Insert quotes…
Post reply
Forums
Mathematics
General Math
Intersection between line and cylinder
Back
Top