<p>I'm curious if anyone has any insight into how one might procedurally generate 4D objects, as showcased in Miegakure (or the developer's other game, <a href="https://4dtoys.com/" rel="nofollow noreferrer">4D Toys</a> ).</p>

<p>I built a program a while back to do this, basically using "shape definition" files that I found (and subsequently processed) for the regular polychora like the hypercube, 120-cell, 600-cell etc. Example shape files can be found on <a href="http://paulbourke.net/geometry/hyperspace/" rel="nofollow noreferrer">Paul Bourke's website</a>. </p>

<p>Another way that I've recently discovered is, using a convex hull algorithm like Qhull to extract this information. You can first generate all of the vertices for your polytope (these are usually just even/odd permutations of certain 4-tuples). Then, you run Qhull to find how the vertices are connected to one another. The problem with this method is, it requires significant pre-processing, and the tetrahedral meshes that are generated aren't always very clean. </p>

<p>In 4D Toys, the author(s) are able to build shapes like a "hollowed out" 120-cell, so I'm curious if they are approaching this problem from a different angle - perhaps, one that is more flexible than the aforementioned approaches.</p>

<p>I'm curious if there are other ways of modeling and/or algorithmically generating shapes like those found in Miegakure that I haven't thought about? 
What are other ways of approaching this design challenge?</p>

<p>Thanks in advance for any help or guidance.</p>

CC BY-SA 4.0
2020-02-22T17:44:44.603Z
@DanielMGessel yeah, that is correct. I actually got this part working too - it works by tetrahedralizing the 4D object, then intersecting each tetrahedra with an adjustable hyperplane (normal, offset). But you still need to generate the 4D object topology before you can do any of this...unless I'm missing something?
mike
CC BY-SA 4.0
2020-02-22T18:50:53.907Z
@DanielMGessel that is very interesting! After a quick search, I found a couple of interesting references: the paper "Isosurfacing in Higher Dimensions" as well as "Direct Construction of a Four-Dimensional Mesh Model from a Three-Dimensional Object with Continuous Rigid Body Movement," which I had actually come across before. I'll look into it, but this seems promising!
mike
<rendering><mathematics><computational-geometry><procedural-generation>
Procedural Generation of 4D Shapes
mike
# Procedural Generation of 4D Shapes

(Asked by: username_0 on 2020-02-22)

I'm curious if anyone has any insight into how one might procedurally generate 4D objects, as showcased in Miegakure (or the developer's other game, [4D Toys](https://4dtoys.com/) ).

I built a program a while back to do this, basically using "shape definition" files that I found (and subsequently processed) for the regular polychora like the hypercube, 120-cell, 600-cell etc. Example shape files can be found on [Paul Bourke's website](http://paulbourke.net/geometry/hyperspace/).

Another way that I've recently discovered is, using a convex hull algorithm like Qhull to extract this information. You can first generate all of the vertices for your polytope (these are usually just even/odd permutations of certain 4-tuples). Then, you run Qhull to find how the vertices are connected to one another. The problem with this method is, it requires significant pre-processing, and the tetrahedral meshes that are generated aren't always very clean.

In 4D Toys, the author(s) are able to build shapes like a "hollowed out" 120-cell, so I'm curious if they are approaching this problem from a different angle - perhaps, one that is more flexible than the aforementioned approaches.

I'm curious if there are other ways of modeling and/or algorithmically generating shapes like those found in Miegakure that I haven't thought about?
What are other ways of approaching this design challenge?

Thanks in advance for any help or guidance.

**Tags:** rendering, mathematics, computational-geometry, procedural-generation

> **Comments:**
> **username_0**: @DanielMGessel yeah, that is correct. I actually got this part working too - it works by tetrahedralizing the 4D object, then intersecting each tetrahedra with an adjustable hyperplane (normal, offset). But you still need to generate the 4D object topology before you can do any of this...unless I'm missing something?  
> **username_0**: @DanielMGessel that is very interesting! After a quick search, I found a couple of interesting references: the paper "Isosurfacing in Higher Dimensions" as well as "Direct Construction of a Four-Dimensional Mesh Model from a Three-Dimensional Object with Continuous Rigid Body Movement," which I had actually come across before. I'll look into it, but this seems promising!  

---

## 0 answers

