POV-Ray : Newsgroups : povray.general : the trace function and toroidal objects : Re: the trace function and toroidal objects Server Time
3 Aug 2024 22:15:02 EDT (-0400)
  Re: the trace function and toroidal objects  
From: melundbe
Date: 1 Oct 2003 09:39:47
Message: <oprwc9kks7mulnlm@localhost>
Funky! It worked!  Thank you Mike!

*reads documentation on trace() one more time*

Oh, so that's what it said.


> I came very close to agreeing with you (except that I was using POV 3.5)
> My mistake was using  "trace(Shape,Q,P)" in the following code instead
> of "trace(Shape,Q,P-Q)". Perhaps you're doing something simlar.
>
> #include "functions.inc"
>
> global_settings {assumed_gamma 1.0}
>
> camera { location  <-1, 3, -4> look_at <0, 0, 0> angle 27}
>
> background {rgb <0.5,0.6,0.7>}
>
> light_source {<-100,200,-100> colour rgb 1}
>
> #declare F_bozo=function{
>   pigment{bozo
>      colour_map {[0 rgb 0][1 rgb 1]}
>      scale 0.2
>   }
> }
>
> #declare Shape=
> isosurface {
>   function { f_torus(x,y,z,0.7,0.5) + F_bozo(x,y,z).grey*0.3}
>         max_gradient 2
>         contained_by{sphere {0,1.3}}
>         pigment {rgb 0.1}
>         finish {phong 0.5 phong_size 10}
> }
>
> object {Shape}
>
> #declare A=0;
> #while (A<360)
>   #declare B=0;
>   #while (B<360)
>     #declare P = vrotate(vrotate(<0,0.5,0>,A*z) + x*0.7, B*y);
>     #declare Q = vrotate(x*0.7, B*y);
>     #declare T = trace(Shape,Q,P-Q);
>     sphere {T,0.03 pigment {rgb 1}}
>     #declare B=B+8;
>   #end
>   #declare A=A+15;
> #end


Post a reply to this message

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