POV-Ray : Newsgroups : povray.binaries.scene-files : YARS Server Time
23 Nov 2024 18:18:57 EST (-0500)
  YARS (Message 1 to 1 of 1)  
From: Stefan Viljoen
Subject: YARS
Date: 2 Dec 2007 04:37:47
Message: <47527cea@news.povray.org>
See pbi fro the image generated by this code. Based on code / idea posted by
Shay a few months ago concerning spirographs. 

You'll need Chris Colefax's Galaxy plugin as well. INI file attached.

#include "colors.inc"

global_settings {
  adc_bailout 0.003922
  ambient_light <1.0,1.0,1.0>
  assumed_gamma 1.9
  hf_gray_16 off
  irid_wavelength <0.247059,0.176471,0.137255>
  max_intersections 128
  max_trace_level 20
  number_of_waves 10
  noise_generator 2
  charset ascii
}

camera
{
        location <0,0,30>
        look_at <0,0,0>
}

light_source
{
        <0,0,10>
        color White*1.5
}

#declare radius_fixed = 2;
#declare radius_rotating = 4;
#declare spiro_offset = 1;

#declare my_degrees = 0.1;

#declare object_1 = union
{
#while (my_degrees < 360)

  #declare x_loc = (radius_fixed + radius_rotating) * cos(my_degrees /
57.3) - 
  (radius_rotating + spiro_offset) * cos((((radius_fixed +
radius_rotating) /      
    radius_rotating)) * (my_degrees /*/ 57.3*/));               
  
  //#debug concat("X:" , str(x_loc,3,3) "\n")
  
  #declare y_loc = (radius_fixed + radius_rotating) * sin(my_degrees /
57.3) - 
  (radius_rotating + spiro_offset) * sin((((radius_fixed +
radius_rotating) /      
    radius_rotating)) * (my_degrees /*/ 57.3*/));               
  
  //#debug concat("Y:" , str(y_loc,3,3) "\n")
  
  sphere
  {
    <x_loc,y_loc,0>,0.1

  }

  #declare my_degrees = my_degrees + 0.025;
#end
}

#declare obj_set = union
{
object
{
        object_1
}

object
{
        object_1
        
        scale 0.75
        rotate y*45
}

object
{
        object_1
        
        scale 0.75
        rotate y*-45
}
}

#declare scene_obj = union
{
object
{
        obj_set

        translate <8,4,0>
}

object
{
        obj_set

}

object
{
        obj_set

        translate <-8,-4,0>
}
}


object
{
        scene_obj

        material

        {
                texture
                {
                        pigment
                        {
                                gradient y

                                color_map
                                {
                                        [0 color Red transmit 0.75]
                                        [0.25 color Coral transmit 0.95]
                                        [0.5 color White transmit 0.55]
                                        [0.75 color Coral transmit 0.95]
                                        [1 color Red transmit 0.75]
                                        
                                }

                                scale 9
                                rotate z*45
                        }

                        finish
                        {
                                diffuse 0.25
                                ambient 0.35
                                reflection 0.45
                        }       
                }
        }
}


#declare star_count = 800;
#declare star_scale = 2;
#declare star_color = Coral;
#include "galaxy/galaxy.sf"

#declare star_count = 1000;
#declare star_scale = 4;
#declare star_color = Coral;
#declare star_type = 3;
#declare star_distribution = 1.25;
#declare star_color_turn = 0.315;
#include "galaxy/galaxy.sf"

#declare galaxy_bgstars = 1;
#declare galaxy_bgnebula = 3;
#declare galaxy_nebula_ambient = <1.25,1.25,1.25>;
#declare galaxy_color1 = Coral;
#declare galaxy_color2 = Red;
#include "galaxy/galaxy.bg"


-- 
Stefan


Post a reply to this message


Attachments:
Download 'us-ascii' (2 KB)

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