POV-Ray : Newsgroups : povray.animations : Leaving a Trail : Re: Leaving a Trail Server Time
19 May 2024 05:53:44 EDT (-0400)
  Re: Leaving a Trail  
From: OpalPlanet
Date: 19 Jun 2007 15:00:01
Message: <web.467826ffca61a70e39928d3a0@news.povray.org>
I think sphere_sweep would work better, but i am having difficultly placing
the control points. I have .txt data files with <t,x,y,z> data for all the
planets, and i wanted to read that in and use each pint as one of the
control points. I'm new to this, but here is my best go at using a while
loop:


//to make the paths
#declare pathcount=1;
#while(pathcount <= num_planets)

  #switch(pathcount)
    #case(1)                  //Mercury
      #declare n = 0;
      #while( n < cnt)
       #read(mercury,tt,xx,yy,zz)
       #declare n = n +1;
      #end
      #render concat("Read up to file line ",str(n,6,0),"n")
   #break

    #case(2)                  //Venus
      #declare n = 0;
      #while( n < cnt)
       #read(venus,tt,xx,yy,zz)
       #declare n = n +1;
      #end
    #break

    #case(3)                  //Earth
      #declare n = 0;
      #while( n < cnt)
       #read(earth,tt,xx,yy,zz)
       #declare n = n +1;
      #end
   #break

   #case(4)                  //Mars
      #declare n = 0;
      #while( n < cnt)
       #read(mars,tt,xx,yy,zz)
       #declare n = n +1;
      #end
    #break
       #end

 sphere_sweep {
 quadratic_spline cnt,
 #declare n = 0;
 #while ( n<=cnt)
 <xx,yy,-zz>, .01
 #declare n = n +1;
 #end
  tolerance 0.1
  texture{pigment {White}
 finish {ambient 1}
 no_shadow
 }
 }

 #end

 #declare pathcount = pathcount +1;

#end//end paths


Obviously, not working.

Help, please?
OpalPlanet


"Rune" <new### [at] runevisioncom> wrote:
> Roman Reiner wrote:
> > A merge or union of cylinders will most probably give better results
> > in less render time than both methods described above (all might be
> > worth a try though)
>
> Yes, agreed. I don't know why I forgot about that option.
>
> Merge can be very slow with a high number of objects though, so if a
> semi-transparent path is desired, sphere_sweeps may be faster after all,
> though I haven't compared results myself. If a semi-transparent path is not
> needed, union should definitely be used rather than merge.
>
> Rune
> --
> http://runevision.com


Post a reply to this message

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