POV-Ray : Newsgroups : povray.newusers : new guy here needs help : new guy here needs help Server Time
4 Nov 2024 13:03:54 EST (-0500)
  new guy here needs help  
From: Matthew Pace
Date: 19 Aug 2003 12:09:40
Message: <matt-pace-AD18FA.09093819082003@netplex.aussie.org>
hi there, my names matt.  ive been using pov for a couple of months off 
and on now.  i have a few questions.  first of all, i need a good place 
to learn about media, specifically, media inside of objects.  next, i 
have a math/coding question.  i am attempting to have a bunch of 
cylinders have one base one the imaginary surface of a 3 unit wide 
sphere and the other side on the inside surface of an imaginary sphere 
with a 5 unit diameter.  this is what i have so far:

camera
{
   location <0,-11,-7>
   look_at <0,-2,0>
}
light_source
{
   <5,5,5>
   color rgb <2,2,2>
}


#declare circ_large_diam=5;
#declare circ_small_diam=3;
#declare y_coord_outer=2.5;
#declare y_coord_inner=1.5;
#declare point_step=10;
#declare current_point=0;
#declare ending_point=360;
#while (y_coord_outer=2.5 >= -2.5)
   #while (current_point <= ending_point)
      cylinder
      {
         
<cos(radians(current_point))*circ_large_diam,y_coord_outer,sin(radians(cu
rrent_point))*circ_large_diam>,<cos(radians(current_point))*circ_small_di
am,y_coord_inner,sin(radians(current_point))*circ_small_diam>, .15
         texture
         {
            pigment
            {
               color rgbf <.2,.2,.6,.5>
            }
         }
      }
      #declare current_point=current_point+point_step;
   #end
   #declare circ_small_diam=circ_small_diam-.3;
   #declare circ_large_diam=circ_large_diam-.5;
   #declare currnet_point=0;
   #declare y_coord_outer=y_coord_outer-.25;
   #declare y_coord_inner=y_coord_inner-.15;
#end

global_settings 
{
assumed_gamma 1.0
ambient_light color rgb <1,1,1>
}
  


before, i had terribly variable names, it would have been tough for you 
to decipher them.  the problem then was there there was a degenerate 
cylinder (base pt= apex pt), and the error appeared at line 24 or 
something (where the texture beginning is), so the error was most likely 
where teh points of the cylinder are declared (big duh).  now, after i 
changed the names, it wont even parse anymore, it starts teh parser, and 
doesnt parse any lines.  i think i may have to change the double closing 
parenthesis to after teh multiplication of the diameter, but im not 
sure.  any help would be great

thanks a lot
~matt


Post a reply to this message

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