 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"koppi" <jak### [at] gmail com> wrote:
> I would like to have equal spacing between the dominoes, but I do not know how
> to calculate that, do you have an idea?
Luckily, I have played a lot with spirals, and needed to address this issue when
implementing Marschner's wood texture.
Here's a little scene that calculates the arc length along the spiral and uses
that to control a pigment {function {}}.
Hopefully you can see how that's all daisy-chained together and can use that to
place your dominoes.
- Bill
Post a reply to this message
Attachments:
Download 'spiralpattern.pov.txt' (4 KB)
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Bald Eagle" <cre### [at] netscape net> wrote:
> Hopefully you can see how that's all daisy-chained together and can use that to
> place your dominoes.
Oh Bill, thank's for the inspiration!
I just added the arc_length and solve_theta_for_arc functions to my Lua code:
https://github.com/bullet-physics-playground/bpp/commit/2b52508742249fe96dc48f6aa3b2ef5ab3867bd0
It works! - see attached screenshot, jippie!
Post a reply to this message
Attachments:
Download 'screenshot_20260501_142400.png' (250 KB)
Preview of image 'screenshot_20260501_142400.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"koppi" <jak### [at] gmail com> wrote:
> It works! - see attached screenshot, jippie!
Video link
https://youtu.be/coJWp8DlpFU
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"koppi" <jak### [at] gmail com> wrote:
> It works! - see attached screenshot, jippie!
Excellent.
I see that the dominoes are positioned at an angle, and that spot around the
270-degree mark has a marked discontinuity, and so those dominoes get shot out.
Can you position the dominoes so that they are perpendicular to the normal of
the spiral? Or is the imperfectness of their placement a "feature" for more
realism?
- BW
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Bald Eagle" <cre### [at] netscape net> wrote:
> Can you position the dominoes so that they are perpendicular to the normal of
> the spiral? Or is the imperfectness of their placement a "feature" for more
> realism?
I just have fixed the domino orientation along the spiral as you have suggested,
for the changes see:
https://github.com/bullet-physics-playground/bpp/commit/e37fa0de7a0b94d2233428c690e93d29322b2154
Kind regards,
koppi
Post a reply to this message
Attachments:
Download 'screenshot_20260501_180139.png' (264 KB)
Preview of image 'screenshot_20260501_180139.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"koppi" <jak### [at] gmail com> wrote:
> I just have fixed the domino orientation along the spiral as you have suggested,
Perfect.
Now set up all the dominoes like so:
https://news.povray.org/povray.advanced-users/attachment/%3Cweb.659879b9cca34dee1f9dae3025979125%40news.povray.org%3E/m
athpatterns1.png
:D
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Bald Eagle" <cre### [at] netscape net> wrote:
> Now set up all the dominoes like so:
>
>
https://news.povray.org/povray.advanced-users/attachment/%3Cweb.659879b9cca34dee1f9dae3025979125%40news.povray.org%3E
/m
> athpatterns1.png
Bill, do you mean I should arrange some self similar, some sort of fractal
domino arrangement to the playground? - That's an interesting challenge!
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"koppi" <jak### [at] gmail com> wrote:
> Bill, do you mean I should arrange some self similar, some sort of fractal
> domino arrangement to the playground? - That's an interesting challenge!
I was only half-joking, but if you can make it happen, then YES!
That pattern is from a shader on ShaderToy by Fabrice Neyret. It was only like
6 lines of code.
Might help, might make it more confusing.
You might also have to consider adjusting the size of the dominoes as the
spirals get longer and the spacing is limited.
- BW
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Bald Eagle" <cre### [at] netscape net> wrote:
> That pattern is from a shader on ShaderToy by Fabrice Neyret. It was only like
> 6 lines of code.
>
> Might help, might make it more confusing.
Foud it: https://www.shadertoy.com/view/XtSBDK
Will see, what can be done with it inside BPP ;-)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"koppi" <jak### [at] gmail com> wrote:
> "Leroy" <whe### [at] gmail com> wrote:
> > I was wondering how you place the dominoes. I use a spline for placement. I
> > have my dominoes placed 2 pov units apart. That because I don't use true physics
> > to move the dominoes.
>
> Archimedean spiral calculation is used to create the control points [1]:
>
> [... line 47]:
> local angle = (i - 1) * 0.09
> local radius = 5 + angle * 0.95
> cp = {
> x = math.cos(angle) * radius,
> y = y_pos,
> z = math.sin(angle) * radius,
> }
> [...]
>
I basically did the same but written in POV3.7.
> The control points are then fed to the Catmull-Rom spline function [2] with the
> tension parameter set to 0.5.
>
> > Noticed that your dominoes have different spacing, they got tighter toward the
> > center.
>
> I would like to have equal spacing between the dominoes, but I do not know how
> to calculate that, do you have an idea?
>
I'm a little late on this one, as you already have a better way than I have. I
wrote the spline starting from the outside in like normal. Then translated all
the control points so the outer point was <0,0,0>. That because these spirals
where made to be part of a bigger Field of dominoes and also be able to use a
spiral over & over & .....
I use this spline to hunt down each domino point that was 2 pov units from the
last domino placed. I started at 0 +some very small number (.0001 I think) then
keep adding that small value until I got vlength(Oldpoint,Newpoint) =2. The only
problem was at the very end when the search point goes out of range. So I put a
Stop Gap if the search counter got to big.(.1 is to big) not very efficient.
> > Your physics engine did a good job of dropping them. I also like the
> > wiggle the engine gave to the already down dominoes.
>
> I have been experimenting with different parameters for the friction,
> restitution, linear and angular damping of the dominoes, currently using:
>
> friction = 0.01
> restitution = 0.01
> damp_lin = 0.5
> damp_ang = 0.01
>
> Kind regards,
> koppi
>
> --
> [1]
>
https://github.com/bullet-physics-playground/bpp/blob/b558bdf8e8ab23a1438d0162d40c7f0029eb3efd/demo/basic/11-domino.l
ua
>
> [2]
>
https://github.com/bullet-physics-playground/bpp/blob/b558bdf8e8ab23a1438d0162d40c7f0029eb3efd/demo/module/spline.lua
#L
> 134
Have Fun!
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |