POV-Ray : Newsgroups : povray.binaries.images : Automated creation of jigsaw puzzle pieces : Re: Automated creation of jigsaw puzzle pieces Server Time
14 May 2024 20:46:37 EDT (-0400)
  Re: Automated creation of jigsaw puzzle pieces  
From: Anthony D  Baye
Date: 12 Feb 2016 03:50:00
Message: <web.56bd9bcc9b9916a5fd6b6fe10@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> And here is the effect I'm trying to achieve.

The first example would be easier to achieve.  You could use a set of
pre-defined "cutting dies" and associated rules for matching them on the edges,
but that could look too regular, and there'd be pieces that were shaped the same
way.

you could generalize just the edge types and try to create rules for matching
them on the corners, but that would be more complicated.

another way would be to do a series of horizontal and vertical cuts along paths
with perturbations based on a set of rules.  I'd start by determining the
endpoints, perhaps ensuring that the midpoint of the line fell within a certain
range, and then subdivide and perturb the line in between the pre-determined
endpoint.

you could use a variant of the first method here, with just the edge dies that
you then use to perturb the line between your pre-determined endpoints,
adjusting each consecutive die so that it lines up with your pre-determined
midline and then doing a flip or a 180 rotate to make the edge more random.

for something truly random, you would need to be more tricky.

This post on mathematica.stackexchange says it better than I ever could

http://mathematica.stackexchange.com/questions/6706/how-can-i-calculate-a-jigsaw-puzzle-cut-path

It looks like they're using a modified voronoi diagram (crackle pattern) and
then modifying the edges with tongues and slots.  No idea how you'd do that
procedurally in POV without duplicating the crackle pattern in SDL.

Sorry I can't be more helpful.

Regards,
A.D.B.


Post a reply to this message

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