|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Just playing with a macro to fill an object with objects. Works good as a
background :-)
It uses *very* primitive collision detection. Just checks to see of any of the
8 corners of the bounding box of a new object or it's center is inside() a union
of all previous objects. So there is probably some overlap.
Now, if only I could get my Intersect(A,B) macro to work...
Questions? Comments?
Michael
--
#macro M(D,J)text{ttf"cyrvetic.ttf"D 1,0translate-J}#end#macro N(E,K)#local A=
M(E,K)light_source{-z*30rgb 1projected_through{A}}#end N("Michael"<1.6,-.2,5>)
N("Johnson"<1.9.8,5>)sphere{z*9,4pigment{gradient x+y scale 10color_map{[0 rgb
x][1rgb x+y]}sine_wave}} // (c)2001 Michael D Johnson red### [at] wvadelphianet
Post a reply to this message
Attachments:
Download 'PovedPov.jpg' (41 KB)
Preview of image 'PovedPov.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Redbeard" <red### [at] wvadelphianet> wrote in message
news:3bf1f674@news.povray.org...
> Just playing with a macro to fill an object with objects. Works good as a
> background :-)
>
> It uses *very* primitive collision detection. Just checks to see of any of
the
> 8 corners of the bounding box of a new object or it's center is inside() a
union
> of all previous objects. So there is probably some overlap.
>
> Now, if only I could get my Intersect(A,B) macro to work...
>
> Questions? Comments?
>
This may be a dumb question, because I still haven't had the time to figure out
trace(). Wouldn't trace work better? If not, why?
- Nekar
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.286 / Virus Database: 152 - Release Date: 2001/10/09
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Nekar Xenos" <j-p### [at] citywalkcoza> wrote in message
news:3bf20e9b@news.povray.org...
>
> This may be a dumb question, because I still haven't had the time to figure
out
> trace(). Wouldn't trace work better? If not, why?
>
> - Nekar
Well, I'm just starting to play. I don't know how trace() works yet, but that
will be one of my next steps. Inside() is easy to understand. Trace() is a bit
more complicated. But it may well be a better choice. I just don't know yet.
Michael
--
camera{location<8,20>look_at<6,0,4>}light_source{<8,8>rgb 1}difference{union{
#macro M(D,J)#local R=asc(substr(D,J,1))-32;<div(R,10)*2,mod(R,10)>#end#macro
E(D,B,R)prism{-D,4+D,R#local C=1;#while(C<R+1)M(B,C)#local C=C+1;#end}#end E(
0," (2:FPKAD80* U_dZU"18)sphere{2,2}#macro T(N)cylinder{<9,-N,3><9,4+N,3>3-N}
#end T(0)}T(2)E(1"45LNXUK4"8)pigment{rgb x+y/2}}//(c)2001 MDJohnson(Redbeard)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> This may be a dumb question, because I still haven't had the time to
figure out
> trace(). Wouldn't trace work better? If not, why?
Trace() shoots a ray. It's helpful if you have an object that's going to
move in a specific direction and you want to see how close the nearest
obstacle is in the direction it's moving. It doesn't really help you with
stationary objects.
- Slime
[ http://www.slimeland.com/ ]
[ http://www.slimeland.com/images/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Slime wrote:
>>This may be a dumb question, because I still haven't had the time to
>>
> figure out
>
>>trace(). Wouldn't trace work better? If not, why?
>>
>
> Trace() shoots a ray. It's helpful if you have an object that's going to
> move in a specific direction and you want to see how close the nearest
> obstacle is in the direction it's moving. It doesn't really help you with
> stationary objects.
Well, it helps to place "stationary" objects... at least to me.
--
--
Jaime Vives Piqueres
La Persistencia de la Ignorancia
http://www.ignorancia.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Jaime Vives Piqueres" <jai### [at] ignoranciaorg> wrote in message
news:3BF### [at] ignoranciaorg...
> Slime wrote:
> >
> > Trace() shoots a ray. It's helpful if you have an object that's going to
> > move in a specific direction and you want to see how close the nearest
> > obstacle is in the direction it's moving. It doesn't really help you with
> > stationary objects.
>
>
> Well, it helps to place "stationary" objects... at least to me.
>
I just looked at the trace function. It seems to me it would be useful for
stacking stationary objects, but not randomly jumbling them around in space, as
my macro does.
What I'm trying to achieve is to place an object within the space that some
other object would occupy without intersecting previously placed objects. As an
example, imagine a simple snow-globe, a container with liquid and "snow"
particles. Shake it up. The particles roughly fill the space, but no two
intersect. This is what I want to do.
Michael
--
#macro M(D,J)text{ttf"cyrvetic.ttf"D 1,0translate-J}#end#macro N(E,K)#local A=
M(E,K)light_source{-z*30rgb 1projected_through{A}}#end N("Michael"<1.6,-.2,5>)
N("Johnson"<1.9.8,5>)sphere{z*9,4pigment{gradient x+y scale 10color_map{[0 rgb
x][1rgb x+y]}sine_wave}} // (c)2001 Michael D Johnson red### [at] wvadelphianet
Post a reply to this message
|
|
| |
| |
|
|
From: Marc-Hendrik Bremer
Subject: Re: POV'ed POV-Ray logo (~40kbu)
Date: 15 Nov 2001 05:02:53
Message: <3bf392cd@news.povray.org>
|
|
|
| |
| |
|
|
Redbeard schrieb in Nachricht <3bf3299a$1@news.povray.org>...
>What I'm trying to achieve is to place an object within the space that some
>other object would occupy without intersecting previously placed objects.
As an
>example, imagine a simple snow-globe, a container with liquid and "snow"
>particles. Shake it up. The particles roughly fill the space, but no two
>intersect. This is what I want to do.
>
You could use trace() for this. To determine if a given place (get it by
using rand() f.e.) for a particle is already occupied by another particle,
you could trace() from the centre of that particle in "all" directions (the
more rays you shoot , the more accurate are your results) at the union of
the other particles. You'll get a bunch of intersection points. If all
intersection points are further away of the centre than the particle is
wide, you know that you can use that place. If not - try another one.
That's the way I would try it (never did, though).
Marc-Hendrik
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Marc-Hendrik Bremer" <Mar### [at] t-onlinede> wrote in message
news:3bf392cd@news.povray.org...
>
> Redbeard schrieb in Nachricht <3bf3299a$1@news.povray.org>...
>
> You could use trace() for this. To determine if a given place (get it by
> using rand() f.e.) for a particle is already occupied by another particle,
> you could trace() from the centre of that particle in "all" directions (the
> more rays you shoot , the more accurate are your results) at the union of
> the other particles. You'll get a bunch of intersection points. If all
> intersection points are further away of the centre than the particle is
> wide, you know that you can use that place. If not - try another one.
>
> That's the way I would try it (never did, though).
>
> Marc-Hendrik
Unfortunately, I don't know the shape of my particle. The center of the
bounding box may or may not be within the object. This may work about on equal
level with my method, though, which uses inside(). I'll have to run some tests
to see which is more efficient.
Michael
--
#declare R=<8,4,.6>/3;#declare C=function{pattern{object{text{ttf"crystal.ttf"
"MDJ"1,0translate-R/4}}}}camera{location-z*30}box{-R,R pigment{rgbf 1}interior
{media{emission.1density{function{C(x,y,z)}density_map{[0mandel 50color_map{[0
rgb 0][.2rgb x][1rgb x+y]}interior 1,1.5scale 60translate<-33.75,2.85>exponent
4][1rgb<2,2>]}}}}scale 24hollow}// (c) 2001 MDJohnson red### [at] wvadelphianet
Post a reply to this message
|
|
| |
| |
|
|
From: Marc-Hendrik Bremer
Subject: Re: POV'ed POV-Ray logo (~40kbu)
Date: 15 Nov 2001 13:05:01
Message: <3bf403cd@news.povray.org>
|
|
|
| |
| |
|
|
Redbeard schrieb in Nachricht <3bf3bbe1$1@news.povray.org>...
>Unfortunately, I don't know the shape of my particle. The center of the
>bounding box may or may not be within the object. This may work about on
equal
>level with my method, though, which uses inside(). I'll have to run some
tests
>to see which is more efficient.
Of course it's much better to trace from the outer rim of the object anyway.
No need to know where the centre is :-). In fact, if the object is not
approx. spherical, the described method is quite bad. I really don't know if
it's worth the effort. I just wanted to show a way you could do it with
trace.
Marc-Hendrik
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|