POV-Ray : Newsgroups : povray.animations : Dominoes : Re: Dominoes Server Time
4 May 2026 17:20:28 EDT (-0400)
  Re: Dominoes  
From: Leroy
Date: 1 May 2026 16:55:00
Message: <web.69f5120ccea3e23e2e883926f712fc00@news.povray.org>
"koppi" <jak### [at] gmailcom> wrote:
> "Leroy" <whe### [at] gmailcom> 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

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