POV-Ray : Newsgroups : povray.general : Cylinder with origin, point_to and length : Re: Cylinder with origin, point_to and length Server Time
2 Aug 2024 20:18:09 EDT (-0400)
  Re: Cylinder with origin, point_to and length  
From: KalleK
Date: 31 Jul 2004 03:53:48
Message: <410b500c$1@news.povray.org>
Hi!

Not tested, but what about this:

#declare StartPoint = YourOrigin;
#declare Direction = (ParticularPoint - StartPoint);

#declare EndPoint = StartPoint + Direction *
(CylinderLength/vlength(Direction));
or
#declare EndPoint = StartPoint + vnormalize(Direction)*CylinderLength;

cylinder {StartPoint, EndPoint, Radius ... }

cukk


Post a reply to this message

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