POV-Ray : Newsgroups : povray.general : Cylinder with origin, point_to and length : Cylinder with origin, point_to and length Server Time
2 Aug 2024 20:16:15 EDT (-0400)
  Cylinder with origin, point_to and length  
From: Rick Measham
Date: 31 Jul 2004 01:45:00
Message: <web.410b30ae7ef9b5f8ddeed8210@news.povray.org>
I'm trying to work out how to create a cylinder that points at a particular
point. I have an origin and a length (and radius of course).

Given these, I'm sure it must be possible to calculate the other end of the
cylinder (one end is the origin). The unknown end will fall upon the
imaginary line between the origin and the point_to and will be length units
from the origin.

My 2D trig doesn't work here. I can put it on the XY axis in the correct
position and I can put it on the YZ axis in the correct position (thus the
XZ is also easy). However getting onto an XYZ axis is proving impossible.

It's occurred to me after several hours of playing around that this problem
must have been solved thousands of times already. If not for POV-Ray then
for someone's math class sometime.

Thanks!
Rick


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.