How can I generate a cheese model with air holes placed randomly?
I can create a handmade cheese model using move, subtract, and intersect operations. How can I generate a cheese model automatically, with air holes placed randomly?
Comments
-
Hello.
Bricscad doesn't include a tool to create random objects.
If you are accustomed to using an API, lisp for instance, you could create an air hole as a parametric block, and then insert multiple instances in various positions using various sizes.
However, the result will be far from realistic.
So, maybe, a 3D modeling tool - Blender, 3DS Max - could be more useful for this task.2 -
Hi juliette1699
i like cheese in general combined with a glass of red wine so i gave it a try…….😄
Just load the attached lisp program and call the command RANDOMHOLES in the command line.
Many spheres will be created at random locations and random sizes within the bounding box of the cheese piece (solid3d) in relation to the cheese volume ! You can input the number of holes (spheres)
You can then subtract the spheres from the cheese and get what you want….
Here are the code lines where you can calculate max and min radius of holes
related to the cheese volume and variate the intervals 10-200 and 5000-20000
to achieve the wished and preferred distribution and variation of hole sizes!(setq max-radius (getRadiusFromVol (/ cheVol (randreal-min<>max
10 200
)))
min-radius (getRadiusFromVol (/ cheVol (randreal-min<>max
5000 20000
)))
)You find attached your drawing with Holes generated, a test drawing and the lisp routine.
Load it using the command APPLOAD.
I hope this helps !
Some Screenshots…3 -
Evaluate how much time it would take to code such a program, vs. the time to just manually place things. Sakko may lean more towards a programmed solution, because they seem to be very skilled at programming. But, most people are not at that skill level.
And you probably don't want true random placement. Holes that form in cheese near the surface would tend to pop before growing very large. Artists often use programmed methods to do some things, since there are existing utilities to do things like create grass. But often they just draw things where they want them to be… especially since an existing Swiss cheese utility is unlikely to already exist.
-Joe
1 -
Just Materials.
I am a bit disappointed that it seems that no one already created a parametric Geometry Nodes setup for Cheese in Blender.
1 -
Blessed are the cheese makers!
0 -
Cheers…!😉🥂🍷
0