POV-Ray : Newsgroups : moray.win : Feature/plugin Request .... : Re: Feature/plugin Request .... Server Time
29 Jul 2024 10:17:49 EDT (-0400)
  Re: Feature/plugin Request ....  
From: Ken
Date: 10 Feb 1999 12:40:06
Message: <36C1C438.71E40BA0@pacbell.net>
Twyst wrote:
> 
> How about cylinders/cubes/cones that you can define the endpoints of,
> instead of having to rotate & scale them?
> I can see a plugin that has just these normal primitives, but with a numeric
> entry :
> 
> Cube - enter x1,y1,z1 and x2,y2,z2
> Cylinder - enter x1,y1,z1 ,  x2,y2,z2  , radius
> Cone - enter x1,y1,z1 ,  x2,y2,z2  , radius1, radius2
> 
> It would make life MUCH simpler, as well as make cleaner code than taking a
> unit cylinder and scaling/rotating/translating.
> 
> Twyst
> --
> ------------------------------------------------------------
> povray.doc -- An engaging tale about a spanish guy named Manual.
> ------------------------------------------------------------

Are you trying to be funny or am I missing something here ?

A quick example of defining end points on a cylinder would be:

for x
cylinder{x*-1,x*1,1>}

for y
cylinder{y*-1,y*1,1>}

for z
cylinder{z*-1,z*1,1>}

for cones you can do the same thing

for x
cone{x*-1, 1, x*1, 0>}

for y
cone{y*-1, 1, y*1, 0>}

for z
cone{z*-1, 1, z*1, 0>}

and for cubes it takes a little more work but you can
do about the same as above

box{-.5,.5}
 a unit cube

box{0,1}
a unit cube that extends from lower left corner at
xyz = 0 to xyz +1

If you use all six direction vectors in the cylinder and
cone primitives you can scale and rotate them any direction
you like without have to further rotate and scale them with
extra statements.

Have I missed something ?

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

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