POV-Ray : Newsgroups : povray.binaries.images : Flora from planet X [28kb] Server Time
18 Nov 2024 10:24:02 EST (-0500)
  Flora from planet X [28kb] (Message 1 to 10 of 10)  
From: Tom Melly
Subject: Flora from planet X [28kb]
Date: 22 Apr 2002 11:11:57
Message: <3cc4283d@news.povray.org>
Working on a tree macro for the irtc (don't think I'm going to make the
deadline).

Sorry about the mildly obscene top-left version.



--
#macro G(D,E,F)#local I=array[3]{D,E,F}#local B=0;triangle{#while(
B<3)#while(I[B])A[mod(I[B],10)]+#local I[B]=div(I[B],10);#end<-5,-
2,9>#local B=B+1;#end}#end #local A=array[7]{x,x*2,x*4,y,y*2,y*4,z
}light_source{-x*6-z*9,1}mesh{G(105,10,146)G(105,246,10)G(105,56,
146)G(105,1256,246)G(1256,126,220)G(22156,2216,201)pigment{rgb 1}}//TM


Post a reply to this message


Attachments:
Download 'various.jpg' (28 KB)

Preview of image 'various.jpg'
various.jpg


 

From: Tom Melly
Subject: Re: Flora from planet X [28kb]
Date: 22 Apr 2002 11:15:06
Message: <3cc428fa@news.povray.org>
"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3cc4283d@news.povray.org...

BTW here's the code (which is based on some lightning code I wrote ages ago):

#macro Cylinder_Object(CStart, CVec, CWidth, CAng, CLev)
  #local cylLen  = 4 * ((rand(myRand) + 0.5)/CLev);
  #local cylTran = transform{
    rotate x*(2 * CAng * rand(myRand) - CAng)
    rotate y*(360 * rand(myRand))
    Reorient_Trans(y * 1, CVec)
    translate CStart
  }
  #declare segPosB = vtransform(y * cylLen, cylTran);
  #declare segVec = segPosB - CStart;
  cylinder{
    0, y * cylLen, CWidth, 1
    transform{cylTran}
  }
#end

#macro Make_Tree(TArraySize, TSeed, TBWidth, THt, TCutoff, TBranch, TAng, TLevs)

  #declare PosArray = array[TArraySize];
  #declare VecArray = array[TArraySize];
  #declare WidArray = array[TArraySize];
  #declare LevArray = array[TArraySize];
  #declare PosArray[0] = <0,0,0>;
  #declare VecArray[0] = <0,1,0>;
  #declare WidArray[0] = TBWidth;
  #declare LevArray[0] = 1;

  #declare checkCount = -1;
  #declare highCount  = 0;
  #declare myRand     = seed(TSeed);

  #declare Tree =
  blob{
    threshold 0.5
    #while (checkCount < highCount)

      #declare checkCount = checkCount + 1;
      #declare segPosA    = PosArray[checkCount];
      #declare segVec     = VecArray[checkCount];
      #declare segWidth   = WidArray[checkCount];
      #declare segLev     = LevArray[checkCount];
      #declare segPosB    = segPosA;
      #declare CarryOn    = true;

      #while(vlength(segPosB) < THt & segWidth > 0.05 & CarryOn)
        #declare segPosA = segPosB;
        Cylinder_Object(segPosA, segVec, segWidth, TAng, segLev)

        #declare randNum = rand(myRand);
        #if(randNum > 1 - ((segLev^2)/500))
          #declare CarryOn = false;
        #end
        #if (randNum < (TBranch/(segLev^0.25)) & segLev < TLevs &
vlength(segPosB) > TCutoff)
          #declare segWidth  = segWidth * 0.75;
          #declare highCount = highCount + 1;

          #declare PosArray[highCount] = segPosB;
          #declare VecArray[highCount] = segVec;
          #declare WidArray[highCount] = segWidth * 0.95;
          #declare LevArray[highCount] = segLev + 1;
        #end
      #end
    #end
  }
#end

//#macro Make_Tree(TArraySize, TSeed, TBWidth, THt, TCutoff, TBranch, TAng,
TLevs)
Make_Tree(50000, 1868, 5, 40, 8, 0.45, 30, 9)
object{Tree pigment{Gray50}}


Post a reply to this message

From: Shay
Subject: Re: Flora from planet X [28kb]
Date: 22 Apr 2002 12:28:08
Message: <3cc43a18@news.povray.org>
The tops of the trees look very nice. Is the entire structure built with
blobs? If so, what is the render time?

 -Shay

Tom Melly <tom### [at] tomandlucouk> wrote in message
news:3cc4283d@news.povray.org...


Post a reply to this message

From: Tom Melly
Subject: Re: Flora from planet X [28kb]
Date: 22 Apr 2002 12:34:08
Message: <3cc43b80$1@news.povray.org>
"Shay" <sah### [at] simcopartscom> wrote in message news:3cc43a18@news.povray.org...
> The tops of the trees look very nice. Is the entire structure built with
> blobs? If so, what is the render time?
>

I think one of the versions just used cylinders, but the other 3 are blobs.

Render time is okay

for an 800*600 w/AA 0.3 time is about 2-4 minutes (depending on amount of
splitting and random seed) (P3 - 733)


Post a reply to this message

From: Shay
Subject: Re: Flora from planet X [28kb]
Date: 22 Apr 2002 12:38:33
Message: <3cc43c89@news.povray.org>
I think that top left or bottom right would look convincing if the bottom
were cut off or buried in the ground. The rounding at the bottom really
destroys the illusion, but if I put my thumb over it, it looks good. A shot
from a more natural viewing angle would be more telling.

 -Shay

Tom Melly <tom### [at] tomandlucouk> wrote in message
news:3cc43b80$1@news.povray.org...


Post a reply to this message

From: Ross Litscher
Subject: Re: Flora from planet X [28kb]
Date: 22 Apr 2002 12:42:53
Message: <3cc43d8d@news.povray.org>
the tops of the trees are great (almost WOW great :), the trunks need some
work though.


ross


Post a reply to this message

From: Tom Melly
Subject: Re: Flora from planet X [28kb]
Date: 22 Apr 2002 15:25:59
Message: <3cc463c7$1@news.povray.org>
"Shay" <sah### [at] simcopartscom> wrote in message
news:3cc43c89@news.povray.org...
> I think that top left or bottom right would look convincing if the bottom
> were cut off or buried in the ground. The rounding at the bottom really
> destroys the illusion, but if I put my thumb over it, it looks good. A
shot
> from a more natural viewing angle would be more telling.
>

Well, the code's moved on a little - I'll hopefully try it out in a test
scene tonight, w/ some texturing on the tree. The basic code looks like it
would be good for other things (ginseng, ginger, sweet potatoes, coral?),
but, as usual w/ my macros, I can't get the parameters to do anything
particularily predictable. Also, w/ no gravity, it's very dependant on luck
and rand to generate a useful shape.


Post a reply to this message

From: Hugo
Subject: Re: Flora from planet X [28kb]
Date: 22 Apr 2002 15:54:48
Message: <3cc46a88$1@news.povray.org>
Looks very nice and thank you for posting the code! !

Regards,
Hugo


Post a reply to this message

From: Corey Woodworth
Subject: Re: Flora from planet X [28kb]
Date: 22 Apr 2002 17:07:18
Message: <3cc47b86@news.povray.org>
They look like wierd mutant carrots :) I think if you were to add a imilar
brancing to the bottom they would make excellent aliean trees.

Corey


Post a reply to this message

From: Robert
Subject: Re: Flora from planet X [28kb]
Date: 23 Apr 2002 12:37:23
Message: <3CC58DAC.8070401@exmail.de>
I like it! Reminds me of some kind of roots...


Robert

Tom Melly wrote:

> Working on a tree macro for the irtc (don't think I'm going to make the
> deadline).
> 
> Sorry about the mildly obscene top-left version.
> 
> 
> 
> --
> #macro G(D,E,F)#local I=array[3]{D,E,F}#local B=0;triangle{#while(
> B<3)#while(I[B])A[mod(I[B],10)]+#local I[B]=div(I[B],10);#end<-5,-
> 2,9>#local B=B+1;#end}#end #local A=array[7]{x,x*2,x*4,y,y*2,y*4,z
> }light_source{-x*6-z*9,1}mesh{G(105,10,146)G(105,246,10)G(105,56,
> 146)G(105,1256,246)G(1256,126,220)G(22156,2216,201)pigment{rgb 1}}//TM
> 
> 
> 
> various.jpg
> 
> Content-Type:
> 
> image/jpeg
> Content-Encoding:
> 
> x-uuencode
> 
>


Post a reply to this message

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