POV-Ray : Newsgroups : povray.binaries.scene-files : anemone macro Server Time
1 Sep 2024 12:19:49 EDT (-0400)
  anemone macro (Message 1 to 3 of 3)  
From: Tim Attwood
Subject: anemone macro
Date: 27 Jun 2007 02:25:49
Message: <468202ed$1@news.povray.org>
This is the scene file for an anemone...
http://news.povray.org/povray.binaries.images/thread/%3C4682017b%40news.povray.org%3E/


Post a reply to this message


Attachments:
Download 'anemone.pov.txt' (9 KB)

From: bob
Subject: Re: anemone macro
Date: 4 Jul 2007 12:04:36
Message: <pan.2007.07.04.15.14.31.532986@almost.bestweb.net>
On Tue, 26 Jun 2007 23:25:52 -0700, Tim Attwood wrote:



> 

> // usage: vector, vector, float, int, float, float, random stream

> // LOC is location of base

> // DIR is direction and magnitude of growth

> // A is the limit for a random angle of each segment

> // N is the number of segments

> // R1 is the base radius

> // R2 is the tip radius

> // rsd is a random stream to use  

> #macro Tentacle(LOC, DIR, A, N, R1, R2, rsd)

>    #local c = 0;

>    #local loc = LOC;

>    #local dir = DIR;

>    blob {

>    #while (c < 1 ) 

>       #local rad = R1*(1-c)+R2*c;

>       #local dx = rand(rsd)*A*2-A;

>       #local dy = rand(rsd)*A*2-A;

>       #local dz = rand(rsd)*A*2-A;         

>       #local dir = vrotate(dir,<dx,dy,dz>);

>       sphere {loc, rad, 1}

>       #ifdef (lastloc) cylinder {lastloc, loc, rad, 1} #end

>       #local lastloc = loc;

>       #local lastrad = rad;      

>       #local loc = loc+dir;   

>       #local c = c+(1/N); 

>    #end

>    }

> #end

> 


I may be missing something obvious here ... but why not use a sphere_sweep?


Post a reply to this message

From: Tim Attwood
Subject: Re: anemone macro
Date: 9 Jul 2007 21:16:40
Message: <4692ddf8$1@news.povray.org>
> I may be missing something obvious here ... but why not use a 
> sphere_sweep?
sphere_sweeps are buggy. Sometimes they have bad spots.
Hopefully they will be fixed in 3.7


Post a reply to this message

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