POV-Ray : Newsgroups : povray.general : torus, inward/outward tilted : Re: torus, inward/outward tilted Server Time
29 Apr 2024 21:50:22 EDT (-0400)
  Re: torus, inward/outward tilted  
From: peter puzzelaar
Date: 28 Jul 2012 16:40:01
Message: <web.50144d6461ba12ab47437ba70@news.povray.org>
"Cousin Ricky" <rickysttATyahooDOTcom> wrote:
> "peter puzzelaar" <pet### [at] hotmailcom> wrote:
> > Scale a normal torus in the y-direction:
> >   #declare myTorus= torus {24, 0.4 sturm on scale <1, 2, 1>}
> >
> > Now I want to tilt the complete (scaled) torus inward (AND preserving the 2:1
> > ratio of the cross section of the tube)
> >
> > [...]
> >
> > I would be happy for any advice on how to make a torus which has 2:1 ratio of
> > its tube preserved and can be tilted any degrees (0 to 90) inward/outward.
>
> Go to http://lib.povray.org/searchcollection/index.php and type tiltedtorus into
> the Find Keywords field.  See if that's what you're looking for.

Thanks for the help and good advice...
This is what i conjured up (and it worked).

#declare MyTorus =
lathe {
  cubic_spline
  9,
  <T_rad*1.87-0.4*sqrt(2), -0.4*sqrt(2)>,
  <T_rad*1.87            , -0.4*sqrt(2)>,
  <T_rad*1.87+0.4*sqrt(2),  0          >,
  <T_rad*1.87+0.4*sqrt(2),  0.4*sqrt(2)>,
  <T_rad*1.87            ,  0.4*sqrt(2)>,
  <T_rad*1.87-0.4*sqrt(2),  0          >,
  <T_rad*1.87-0.4*sqrt(2), -0.4*sqrt(2)>,
  <T_rad*1.87            , -0.4*sqrt(2)>,
  <T_rad*1.87+0.4*sqrt(2),  0           >
}

This will create a torus with major radius = T_Rad and the points of the lathe
are chosen in such a way that an oval with axes of ratio 2:1 is created.

Again thanks for all help...

Peter


Post a reply to this message

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