POV-Ray : Newsgroups : povray.programming : Making Torus : Re: Making Torus Server Time
20 Sep 2021 07:57:12 EDT (-0400)
  Re: Making Torus  
From: bakom
Date: 19 Sep 2014 22:55:00
Message: <web.541cebed100ee5ff949ffef10@news.povray.org>
Le_Forgeron <lef### [at] freefr> wrote:
> Le 12/09/2014 06:45, bakom a écrit :
> > clipka <ano### [at] anonymousorg> wrote:

<snip>

> Excepted that the parser does not have to be patched in your situation:
> make a macro which will take your parameters and make the needed
> transcriptions in the SDL as it is today.
>
> it might be something like:
>
> #include "transform.inc"
> #macro TorusBRL(Center, Normal, Radius1, Radius2)
> torus {
> Radius1, Radius2 // at <0,0,0>, normal as y
> Reorient_Trans(y, Normal) // still at <0,0,0>, normal as Normal
> translate Center // now at the right place and orientation
> }
> #end
>
> Then you need some trick like
>
> object { TorusBRL(...) texture { pigment { color Yellow } finish {
> Glossy } } }
>
> to texture it.

Thanks a lot for this. Very helpful to me.
So, I can make a macro for azimuth and elevation?
I am trying to write a macro in which I rotate the camera by using rotation as
#macro Set_Camera_rotation { <angle>}.
But need some more knowledge for making this.


Post a reply to this message

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