POV-Ray : Newsgroups : povray.binaries.images : Re: Random points on surface of an object (in advanced-users) Server Time
3 Aug 2024 00:23:31 EDT (-0400)
  Re: Random points on surface of an object (in advanced-users) (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: Thomas de Groot
Subject: Re: Random points on surface of an object (in advanced-users)
Date: 19 Feb 2007 07:32:30
Message: <45d998de@news.povray.org>
Illustrating my question in pov-ray.advanced-users about Tim Attwood's macro 
(22 January 2007).

Thomas


Post a reply to this message


Attachments:
Download 'RandomDistribution.jpg' (144 KB)

Preview of image 'RandomDistribution.jpg'
RandomDistribution.jpg


 

From: Tim Attwood
Subject: Re: Random points on surface of an object (in advanced-users)
Date: 20 Feb 2007 05:52:21
Message: <45dad2e5@news.povray.org>
This works sorta, but you need to know the spline,
and it isn't a very good distribution on the sharp bends.

#declare rsd = seed(1);
union {
#local c = 0;
#while (c<500)
   object{Thorn
   rotate 360*rand(rsd)*z
   Spline_Trans(Stem, rand(rsd), y, 0.01, 0.01)
   }
   #local c = c + 1;
#end
}


Post a reply to this message


Attachments:
Download 'thorn.jpg' (69 KB)

Preview of image 'thorn.jpg'
thorn.jpg


 

From: Thomas de Groot
Subject: Re: Random points on surface of an object (in advanced-users)
Date: 20 Feb 2007 07:59:14
Message: <45daf0a2$1@news.povray.org>
"Tim Attwood" <tim### [at] comcastnet> schreef in bericht 
news:45dad2e5@news.povray.org...
> This works sorta, but you need to know the spline,
> and it isn't a very good distribution on the sharp bends.
>
> #declare rsd = seed(1);
> union {
> #local c = 0;
> #while (c<500)
>   object{Thorn
>   rotate 360*rand(rsd)*z
>   Spline_Trans(Stem, rand(rsd), y, 0.01, 0.01)
>   }
>   #local c = c + 1;
> #end
> }
>


Yes, this is another possibility for a more cactus-like object. I shall try 
that too!

Thanks a lot, Tim.

Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Random points on surface of an object (in advanced-users)
Date: 20 Feb 2007 09:46:00
Message: <45db09a8@news.povray.org>
This is a result test when using 
Point_At_Trans(vnormalize(<Norm.x,0,Norm.z>)). Exactly what I wanted. The 
top is trashy, but that can easily be corrected :-)

Thanks again, Tim.

Thomas


Post a reply to this message


Attachments:
Download 'RandomDistribution.jpg' (88 KB)

Preview of image 'RandomDistribution.jpg'
RandomDistribution.jpg


 

From: Stephen
Subject: Re: Random points on surface of an object (in advanced-users)
Date: 20 Feb 2007 11:50:00
Message: <web.45db25b96a72babbf1cb1e660@news.povray.org>
"Thomas de Groot" <t.d### [at] internlDOTnet> wrote:
> This is a result test when using
> Point_At_Trans(vnormalize(<Norm.x,0,Norm.z>)). Exactly what I wanted. The
> top is trashy, but that can easily be corrected :-)
>
> Thanks again, Tim.
>
> Thomas

It looks OK to me, nice topiary

Stephen


Post a reply to this message

From: Thomas de Groot
Subject: Re: Random points on surface of an object (in advanced-users)
Date: 21 Feb 2007 03:05:19
Message: <45dbfd3f@news.povray.org>
"Stephen" <mcavoys_AT_aolDOT.com> schreef in bericht 
news:web.45db25b96a72babbf1cb1e660@news.povray.org...
>
> It looks OK to me, nice topiary
>

Yes, this works quite well. When I saw Tim's code, I immediately thought 
about its use for topiaries and all those cases where vegetation is hanging 
down a wall. But its use could certainly be extended to lots of other 
applications! For instance, a figure covered with bees? or flies?  :-)

Thomas


Post a reply to this message

From: Stephen
Subject: Re: Random points on surface of an object (in advanced-users)
Date: 21 Feb 2007 04:05:02
Message: <web.45dc0ab06a72babbf1cb1e660@news.povray.org>
"Thomas de Groot" <t.d### [at] internlDOTnet> wrote:
> "Stephen" <mcavoys_AT_aolDOT.com> schreef in bericht
> news:web.45db25b96a72babbf1cb1e660@news.povray.org...
> >
> > It looks OK to me, nice topiary
> >
>
> Yes, this works quite well. When I saw Tim's code, I immediately thought
> about its use for topiaries and all those cases where vegetation is hanging
> down a wall. But its use could certainly be extended to lots of other
> applications! For instance, a figure covered with bees? or flies?  :-)
>
> Thomas

Or made of bees or point glows as a hive intelligence (?).
I looked at your image again at home on a decent screen and I see what you
mean about the top being messy.


Stephen


Post a reply to this message

From: Thomas de Groot
Subject: Re: Random points on surface of an object (in advanced-users)
Date: 21 Feb 2007 07:36:41
Message: <45dc3cd9$1@news.povray.org>
"Stephen" <mcavoys_AT_aolDOT.com> schreef in bericht 
news:web.45dc0ab06a72babbf1cb1e660@news.povray.org...
>
> Or made of bees or point glows as a hive intelligence (?).
Yes, indeed, that would also be an interesting idea to work out.

> I looked at your image again at home on a decent screen and I see what you
> mean about the top being messy.
Yes, it mainly comes from the leaf image that contains a long stem. So, 
first thing to do is get rid of that. Secondly, this is where the supporting 
object bends away. It may then be viewpoint-related. I shall have to 
investigate.

Fwiw, there are some 6000 leaves here and it took v.3.7 about 5 minutes to 
parse and render on a Pentium D machine. About 30 minutes with v.3.6.

Thomas


Post a reply to this message

From: Stephen
Subject: Re: Random points on surface of an object (in advanced-users)
Date: 21 Feb 2007 11:15:00
Message: <web.45dc6fb26a72babbf1cb1e660@news.povray.org>
"Thomas de Groot" <t.d### [at] internlDOTnet> wrote:
> "Stephen" <mcavoys_AT_aolDOT.com> schreef in bericht
> news:web.45dc0ab06a72babbf1cb1e660@news.povray.org...
> >
> > Or made of bees or point glows as a hive intelligence (?).
> Yes, indeed, that would also be an interesting idea to work out.

Especially in an animation. :-)

> > I looked at your image again at home on a decent screen and I see what you
> > mean about the top being messy.
> Yes, it mainly comes from the leaf image that contains a long stem. So,
> first thing to do is get rid of that. Secondly, this is where the supporting
> object bends away. It may then be viewpoint-related. I shall have to
> investigate.

Yes POV can make or break an image.

> Fwiw, there are some 6000 leaves here and it took v.3.7 about 5 minutes to
> parse and render on a Pentium D machine. About 30 minutes with v.3.6.
>



Stephen


Post a reply to this message

From: Thomas de Groot
Subject: Re: Random points on surface of an object (in advanced-users)
Date: 22 Feb 2007 03:44:33
Message: <45dd57f1@news.povray.org>
"Stephen" <mcavoys_AT_aolDOT.com> schreef in bericht 
news:web.45dc6fb26a72babbf1cb1e660@news.povray.org...
>
>> Fwiw, there are some 6000 leaves here and it took v.3.7 about 5 minutes 
>> to
>> parse and render on a Pentium D machine. About 30 minutes with v.3.6.
>>
>
> Impressive, it is probable time I upgraded my wife's machine :-)
>

Well, that might be a good idea :-)

However, there are limits still. The same image, with 2000 leaves but with 
four different image_maps choosen randomly (see image), took about 15 
minutes and the hard drive started to protest. You can easily get to the 
limits of your memory that way.

Thomas


Post a reply to this message


Attachments:
Download 'RandomDistribution.jpg' (182 KB)

Preview of image 'RandomDistribution.jpg'
RandomDistribution.jpg


 

Goto Latest 10 Messages Next 3 Messages >>>

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