Creating a rock shape
Show older comments
Hi everyone,
I need to define a rock shape like 3D Object. The dimensions and inputs types are not important. To sum up, I have to a rock shape in graph like the picture below. Thank you!

1 Comment
Accepted Answer
More Answers (1)
John D'Errico
on 24 Dec 2014
Edited: John D'Errico
on 24 Dec 2014
The best material model of a cat is another, or preferably the same, cat.
Philosophy of Science (1945) (N. Wiener, A. Rosenblueth)
That observation would also apply to rocks.
You don't really say why you need a MATLAB rock. What are your goals for this rock? A model of a rock must have a purpose, otherwise one can clearly choose many ways to create said model. So, with no better information about your goals, I would start with a spherical rock. There is also a joke about spherical cows, in case you missed the reference, though spherical rocks may be a decent approximation for many problems. And since any model is an approximation, I don't know how good of a model you need.
Perhaps the picture was supposed to be a subtle hint. If so, then why not say what you will need it for? How good of a rock shape model do you need? For example, the picture shown shows vaguely irregular rocks, but not terribly so. But they also have cracks in them. A simple model of an irregular shape is easy enough. Go out into your yard, and pick up some rocks. Make careful measurements of said rock in 3-d. Input said data into MATLAB, then use an alpha shape to create a 3-d tessellation of said rock. Repeat with as many rocks as you can find. (When done with the rocks, drop them off in my yard, as I want some spare rocks for landscaping.) You might also use 3-d imaging to create very nice rocks. So it might help to know what you can use to build said rock models.
Do these "rocks" really need to be just simple things you can pack? Note that even sphere packing is not a trivial mathematical task. But you could start with a tessellation of a spherical rock, then add essentially fractal noise to the surface.
Or if you really need a rock model that includes cracks, dirt on the faces, etc., you need to do more work. (From my tenure as an ME, I recall that modeling crack propagation can be a difficult but interesting thing to do well.) So when you have a question, explain it. Explain your needs, your goals. And of course, it helps to know what your capabilities might be. Otherwise, we can do no better than go back to the quote I started with.
8 Comments
Sean de Wolski
on 24 Dec 2014
Edited: Sean de Wolski
on 24 Dec 2014
In grad school, we took tomographic scans of our concrete samples at the APS at Argonne National Lab. Simple image processing then gave us the boundary and cracks in it.
This would actually work okay here, if the rocks could all not exceed about 1/3in diameter. And if you were willing to write a proposal to the US Department of Energy for beam time.
Mücahit Gürbüz
on 24 Dec 2014
Image Analyst
on 24 Dec 2014
I agree with Sean and John that getting CT images of actual sand or gravel would be the most realistic. There are many universities and companies that have micro CT instruments that could do the scan for you at very high spatial resolution (much, much higher than you can get in a hospital where dosage limits the resolution they can achieve).
John D'Errico
on 24 Dec 2014
But if my assertion is reasonable, that rocks can be modeled as fractal surfaces, then it does not matter what size is the rock. It could be blown up to the desired scale with no problems.
Mücahit Gürbüz
on 24 Dec 2014
Image Analyst
on 24 Dec 2014
Perlin noise can make some neat realistic textures and terrains:
John D'Errico
on 24 Dec 2014
I thought the next question would end up being packing.
As I said before, even sphere packing can be non-trivial. The packing of general shapes into a tight complex is a very non-trivial thing to do. So, again, I really think you need to explain your final goals.
Why? Because for example, if in the end all you want is a pretty picture of some rocks, then find an artist who is willing to draw a picture of some rocks! Even easier, pile up some rocks, and take a picture of the pile.
However, if you need a complex of aggregated "rocks" for some other purpose, then what you need to tell us is the purpose of your project. What you will do with the result is crucial to knowing how to best build that result. And in the end, I would return you to that quote I started with. If you need a perfect model, then start with a pile of real rocks.
Mücahit Gürbüz
on 25 Dec 2014
Categories
Find more on Geology in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
