POV-Ray : Newsgroups : povray.binaries.images : Prehistoric colonist ship habitation module parlor revisited (JPG 400x300, 44 KB) : Re: New image, after light_source/wall coincidence correction (JPG 400x300, 52 KB) Server Time
17 Aug 2024 08:18:27 EDT (-0400)
  Re: New image, after light_source/wall coincidence correction (JPG 400x300, 52 KB)  
From: JRG
Date: 23 Oct 2001 13:53:27
Message: <3bd5ae97@news.povray.org>
Ouch! This way is a lotta slower...
1) You can't use lightsources in differences.
2) Do not make differences which involve many scattered objects: the
bounding box will fill the whole scene and the rendering will be extremely
SLOW.
3) Why are you bothering trig, when it's much easier and faster to place
your bulbs with *rotate*? Just use: object {YOUR_BULB translate RADIUS
rotate ANGLE*y}

Try something like this (not tested, and I left the trig part, which IMO
should be substituted with rotate):

#declare Habitation_Module_Parlor_Lamp_Raw=
light_source
{
   <0, 1.25, 0>
   color rgb 1
   // area_light x, y, 1, 4
   fade_distance 3
   fade_power 2
   looks_like
   {  difference {
      cylinder
      {
         <0, -0.75, 0> <0, 0.75, 0>, 0.15 }
      box // your cutting box. Remember that you can also use a cutting
plane.
{
   <-0.2, 0.4, 0> <0.2, 2.1, 0.2>
}

         texture { Light_Tube }
      }
   }
   // adaptive 0
}

#declare Habitation_Module_Parlor_Lamp_Raw_Ring=
union
{
   #declare a=0;
   #while (a<4)
   object
   {
      Habitation_Module_Parlor_Lamp_Raw
      rotate y*(-7.5+a*90)

      translate <5*sin((-7.5+a*90)*(pi/180)), 0,
5*cos((-7.5+a*90)*(pi/180))>
   }
   #declare a=a+1;
   #end
}

#declare Habitation_Module_Parlor_Lamp_Raw_Ring_Stack=
union
{
   #if (clock=8)
     #declare n=2;
     #declare start=0;
   #else
     #declare n=16;
     #declare start=0;
   #end
   #declare a=0;
   #while (a<n)
   object
   {
      Habitation_Module_Parlor_Lamp_Raw_Ring
      translate y*(10+start*2.5+a*2.5)
   }
   #declare a=a+1;
   #end
}


// declaration of the entire habitation module
      object { Habitation_Module_Parlor_Lamp_Raw_Ring_Stack
      texture { Light_Tube }
   }

Hope this helps,

--
Jonathan.


Post a reply to this message

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