POV-Ray : Newsgroups : povray.general : PROBLEM: How to get wavy lines? Server Time
28 Mar 2024 21:17:22 EDT (-0400)
  PROBLEM: How to get wavy lines? (Message 1 to 1 of 1)  
From: Sven Littkowski
Subject: PROBLEM: How to get wavy lines?
Date: 31 Jan 2018 18:49:01
Message: <5a7255ed$1@news.povray.org>
I have created an item, and my aim is to multiply this item that the
result looks like a wavy line (not a straight line), mostly bend up and
downwards, but to some smaller extend sideways, too. I am not really
succeeded yet. If you have free time and feel interested to help me,
please do - I could need some help. :-)
-------------------------------------

#version 3.7;

#declare MyRadiosity = on;
#declare MyClouds = off;
#declare MyLight = on;
#declare MySuns = off;
#declare MyForest = off;
#declare MyPlanet = off;
#declare MyAir = off;
#declare MyTowers = off;
#declare MyBubble = on;
#declare MyBubbleTextures = off;


#declare MyNature = pigment { color rgb < 0.16863,  0.32941,  0.070588 > 
};


global_settings
{
 assumed_gamma 1.4
 #if(MyRadiosity=on)
  radiosity
  {
   media on
//   pretrace_start 0.08
//   pretrace_end   0.001
   count 400
//   error_bound 0.75
//   recursion_limit 1
   normal on
  }
 #end
 subsurface        {}
 adc_bailout       0.0039
 ambient_light     rgb < 0.000, 0.000, 0.000 >
 assumed_gamma     1.000
 irid_wavelength   rgb < 0.250, 0.180, 0.140 >
 max_trace_level   5
 number_of_waves   10
 noise_generator   3
 charset           ascii
}

#default
{
 finish { ambient 0.0 diffuse 1.0 }
}

//------------------------------------------------------------------------
#include "colors.inc"
#include "textures.inc"
#include "glass.inc"
#include "metals.inc"
#include "golds.inc"
#include "functions.inc"
#include "shapes.inc"
//------------------------------------------------------------------------

light_source
{
 < -3000, 1000, -3000 >
 color rgb < 0.4862745,  0.9803922,  0.6823529 >
}

//------------------------------------------------------------------------

camera
{
 location  < 0.0 , 0.0 , -10.0 >
 look_at   < 0.0 , 0.0 , 0.0 >
}

// Element ---------------------------------------------------------------

#declare Element = union
{
 union
 {
  torus
  {
   0.425, 0.075
   rotate < 0.0, 0.0, 90.0 >
   scale < 4.5, 1.125, 1.125 >
  }
  torus
  {
   0.425, 0.075
   rotate < 0.0, 0.0, 90.0 >
   translate < -0.25, 0.0, 0.0 >
  }
  torus
  {
   0.425, 0.075
   rotate < 0.0, 0.0, 90.0 >
   translate < 0.25, 0.0, 0.0 >
  }
  texture
  {
   pigment
   {
    onion
    color_map
    {
     [ 0.0 color rgb 1 ]
     [ 1.0 color rgb < 0.075,  0.0751,  0.075 > ]
    }
    rotate < 0.0, 0.0, 90.0 >
    scale 0.6000
   }
   normal
   {
    granite 0.15 scale 1.0
   }
   finish { phong 0.1 }
  }
 }

 union
 {
  cylinder { < -0.323, 0.0, 0.0 > < -0.322, 0.0, 0.0 > 0.425 }
  cylinder { <  0.323, 0.0, 0.0 > <  0.322, 0.0, 0.0 > 0.425 }
  texture
  {
   pigment
   {
    onion
    color_map
    {
     [ 0.00 color rgbt < 0.7764706,  0.8941176,  0.545098, 0.85 > ]
     [ 0.65 color rgbt < 0.7764706,  0.8941176,  0.545098, 0.85 > ]
     [ 1.00 color rgbt < 0.075,  0.0755,  0.075, 0.35 > ]
    }
    rotate < 0.0, 0.0, 90.0 >
    scale 0.52
   }
   normal
   {
    granite 0.15 scale 1.0
   }
   finish { phong 0.1 }
  }
 }
 sphere
 {
  < 0.0, 0.0, 0.0 > 0.315
  scale < 1.0, 1.0, 1.0 >
  texture
  {
   pigment
   {
    onion
    color_map
    {
     [ 0.0 color rgb < 0.5019608,  0.772549,  0.227451 > ]
     [ 1.0 color rgb < 0.5019608,  0.772549,  0.227451 > ]
    }
    rotate < 0.0, 0.0, 90.0 >
    scale 0.52
   }
   normal
   {
    granite 0.75 scale 0.5
   }
   finish { phong 0.1 }
  }
 }
}

// ---------------------------------------------------------


#macro MyOrbisiana(MyRandomizer)
 #declare MyRandomer = seed((MyRandomizer)+3);
 #declare MyLength   = int(rand(MyRandomer)*200);   // Anzahl der Glieder

 #declare MyNegative = rand(MyRandomer);
 #if(MyNegative<0.5)
  #declare Negative = -1;
 #else
  #declare Negative =  1;
 #end
 #declare MyX        = rand(MyRandomer)*04*Negative;
 #declare MyY        = rand(MyRandomer)*01*Negative;
 #declare MyZ        = rand(MyRandomer)*00*Negative;
 #declare MyPosition = 0.00;
 #declare MyElement  = 0;

 union
 {
  #while (MyElement<MyLength)
   object { Element translate < 0.0, 0.0, MyPosition > rotate < MyX,
MyY, MyZ > }
   #declare MyNegative = rand(MyRandomer);
   #if(MyNegative<0.5)
    #declare Negative = -1;
   #else
    #declare Negative =  1;
   #end
   #declare MyX        = MyX+rand(MyRandomer)*04*Negative;
   #declare MyY        = MyY+rand(MyRandomer)*01*Negative;
   #declare MyZ        = MyZ+rand(MyRandomer)*00*Negative;
   #declare MyPosition = MyPosition+0.925;
   #declare MyElement  = MyElement+1;
  #end
  no_shadow
 }
#end

// Water -----------------------------------------------------------------

background { color rgb < 0.1843137,  0.4666667,  0.5490196 > * 0.5 }

#declare ThisRandom   = seed (27053);
#declare ThisNegative = rand(ThisRandom);
#if(ThisNegative<0.5)
 #declare ANegative   = -1;
#else
 #declare ANegative   =  1;
#end
#declare ThisX        = rand(ThisRandom)*02*ANegative;
#declare ThisY        = rand(ThisRandom)*05*ANegative;
#declare ThisZ        = rand(ThisRandom)*02*ANegative;
#declare ThisPX       = rand(ThisRandom)*3*ANegative;
#declare ThisPY       = rand(ThisRandom)*3*ANegative;
#declare ThisPZ       = rand(ThisRandom)*3*ANegative;
#declare ThisLife     = int(rand(ThisRandom)*50);   // Anzahl der
Orbisianas
#declare ALife        = 0;

#while (ALife<ThisLife)
 #declare MyRandom     = int(rand(ThisRandom)*1000);
 object { MyOrbisiana(MyRandom) scale 0.5 rotate < MyX, MyY, MyZ >
translate < 7.0+ThisPX, ThisPY, ThisPZ > }
 #declare ThisX        = ThisX+(rand(ThisRandom)*02*ANegative);
 #declare ThisY        = ThisY+(rand(ThisRandom)*05*ANegative);
 #declare ThisZ        = ThisZ+(rand(ThisRandom)*02*ANegative);
 #declare ThisPX       = ThisPX+(rand(ThisRandom)*3*ANegative);
 #declare ThisPY       = ThisPY+(rand(ThisRandom)*3*ANegative);
 #declare ThisPZ       = ThisPZ+(rand(ThisRandom)*3*ANegative);
 #declare ALife        = ALife+1;
#end

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

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