POV-Ray : Newsgroups : povray.binaries.images : Grass-like spikes in a POV box Server Time
17 Aug 2024 04:16:35 EDT (-0400)
  Grass-like spikes in a POV box (Message 1 to 3 of 3)  
From: Andrew Cocker
Subject: Grass-like spikes in a POV box
Date: 13 Nov 2001 14:49:23
Message: <3bf17943@news.povray.org>
Hi,

Was just toying around with trace() and came up with this. It wasn't
supposed to be grass, but it does look a little grass-like.

All the best,

Andy Cocker


Post a reply to this message


Attachments:
Download 'Pov-ray grass.jpg' (103 KB)

Preview of image 'Pov-ray grass.jpg'
Pov-ray grass.jpg


 

From: Mahalis
Subject: Re: Grass-like spikes in a POV box
Date: 13 Nov 2001 18:14:17
Message: <3bf1a949@news.povray.org>
Yes it does... source? ;-)

--

//Mahalis
camera{location<0,0.25,-2> look_at 0.5*y} #declare T=texture{pigment{crackle
scale 0.5 rotate 90 turbulence 0.75 color_map{[0 rgb 1][0.05 rgb 1][0.1
rgb<1,0.25,1>][0.25 rgbf 1][1 rgbf 1]}} finish{ambient 1}} #declare
c=difference{torus{0.5,0.1 rotate -90*x}box{<0.7,0,0.2>,<-0.7,-0.7,-0.2>}}
merge{object{c translate<0.5,0.5,0>} object{c translate<-0.5,0.5,0>}
cylinder{<1,0.5,0>,<1,0,0>,0.1} cylinder{<-1,0.5,0>,<-1,0,0>,0.1}
cylinder{0.5*y,0,0.1} texture{T}}
--


"Andrew Cocker" <big### [at] mariner9fsnetcouk> wrote in message
news:3bf17943@news.povray.org...
> Hi,
>
> Was just toying around with trace() and came up with this. It wasn't
> supposed to be grass, but it does look a little grass-like.
>
> All the best,
>
> Andy Cocker
>
>
>


Post a reply to this message

From: Andrew Cocker
Subject: Re: Grass-like spikes in a POV box
Date: 13 Nov 2001 20:10:10
Message: <3bf1c472@news.povray.org>
"Mahalis" <don### [at] fakeycom> wrote in message
news:3bf1a949@news.povray.org...
> Yes it does... source? ;-)

Full source is very messy. The actual trace () bit looked like this:
(apologies for posting source in this group)

#declare MyRad=0.075;

union {
#declare Spacing=0.1;
#declare Cnt=0;
#declare ff=seed(7);

#declare PosX=-5+MyRad;

#while (PosX < 5-MyRad)

  #declare PosY=-5+MyRad;

  #while (PosY < 5-MyRad)

    // trace function
    #declare Norm = <0, 0, 0>;
    #declare Start = <PosX+(rand(ff)-0.5)*Spacing,3,
PosY+(rand(ff)-0.5)*Spacing>;
    #declare Pos = trace (
                  Things,     // pre-declared object to test
                  Start,           // starting point
                  -y,              // direction
                  Norm );          // normal


    #if (Norm.x != 0 | Norm.y != 0 | Norm.z != 0)   // if intersection is
found, normal differs from 0

        union {
          sphere {<0,MyRad,0>,MyRad }
          cone {<0,MyRad,0>,0.02,<0,1,0>,0
                rotate <(rand(ff)*20)-10,(rand(ff)*20)-10,(rand(ff)*20)-10>
                }
          scale rand(ff)
          translate Pos
        }
        #declare Cnt=Cnt+1;

    #end

    #declare PosY=PosY+Spacing;

  #end

  #declare PosX=PosX+Spacing;
#end

texture {MyTex}

}


Post a reply to this message

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