Help with cube truncation animation code

Yes, if you have a vector (a,b,c) (from the origin), you can have an orthogonal plane to it by considering the points (x,y,z) that satisfy an equation such as ax+by+cz = constant.

like so:

[this is what is called “dot product”]

Cool! And that’s the truncated face right? Sorry… this is pretty advanced for me I’ve never touched this topic before

to be precise: you truncate a corner of the cube to get a new face

@NTMDev i had no idea what the word truncate was,so im happy my un-educated guess was correct

I think it means create

in 3D geometry about polyhedra “truncate” means to “cut” some kind of entity (vertex or edge) to create a new face in the place of that entity.

Oh so we made/truncated new faces from an octahedron right? We used the 8 vectors to create the 8 corners of the cube.

well, the opposite: we truncated the 8 corners of a cube to create in order: truncated cube, cuboctahedron (rectified cube), truncated octahedron, octahedron.

t =0, 0.25, 0.5, 0.75, 1

2 Likes

This has been a great exercise for me! I realize that constructing and truncating are exactly the same. To construct a convex solid, for each face, find the plane containing the face, which divides three-dimensional space into two, and an inequality to keep the good side. For a platonic containing the origin, the good side always contains the origin. Then conjoin all face inequalities. Shazam!

I’ve captured all of this here: Truncation | Desmos

Play with the sliders to grow/shrink the five platonics. Using two or more sliders at a time, notice embedding relationships. There is still a problem. I can’t figure out with the icosahedron, which appears with a hat and a base.

I’ve started hacking together a truncation folder, but I haven’t figured out all the abstractions.

1 Like

So neat and so compact. Really nice.

Now you have to create all the truncations of the platonic solids … :slight_smile:
it would be nice to have a slider to show this process (like you did for the cube):

[I was looking to your Math-Explorations … that’s really interesting]

I’m on it! The truncation folders work for the tetrahedron, cube, and octahedron. The constants are not right, though. And D12 and D20 or another matter entirely!

If you notice any cleanup opportunities, I’m always looking to learn how to code better and understand the geometry better.

I really appreciate your encouragement and tutelage.

Thanks! Math explorations is my pretty full-time retirement job. I’m having a blast working with kids.

2 Likes

I noticed that with the vertices you used, the vertices of the dodecahedron do not align with the centers of the faces of the icosahedron. Not a big problem it could just be nicer in the end result if the duality shows up more clearly. I don’t know if this would make the coordinates of the polyhedra too much more involved.

Does the alignment issue arise because I’m using cyclic permutations of (0,±1/ϕ,±ϕ) rather than cyclic permutations of (0,±ϕ,±1/ϕ)? Or is it some other inscrutable thing?

I checked and no, the problem is not that you chose (0,±1/ϕ,±ϕ). The problem is that if we want the coordinates of the dodecahedron to be in the centers of those of the icosahedron they get a little bit less friendly to write (but not that much). One of the points for example becomes:
( 2phi+1, 0, phi) /3. In other words we have to calculate the baricenters of the vertices of the icosahedron … Luckily 6 of them coincide with the vertices of the standard cube and then there are all the ciclic permutations of the point I just wrote with all possibles signs.

Ok, I made a simple drawing to better explain the situation. You can keep the coordinates you are using if you prefer … but at least we undestand better the situation.

https://www.desmos.com/3d/kdpln5vmod

Thanks again for all your help!

You probably noticed that I’m now generating all the vectors from a fairly high-level specification (many fewer lines of code), so making the changes you recommended was extremely easy.

All five shapes are now nicely aligned.

I still have work to do on scaling and ???. I’ve been investigating the inradius and circumradius ratios.

I subscribed to GuzMat. When I stop obsessing about platonics and truncation, I’ll watch some videos.

Thx, that was a nice project … I worked hard on it especially on the Spanish and Italian versions of the channel. I worked hard on the python animations and they were quite nice I think … but it was so time consuming. For the time being I stopped producing videos because I work for a book editor and I’m producing videos and books for them … but I may create some more videos for YT when I have time.

Great! I think it looks much better now. And yes I love how you coded the coordinates in a compact way … that’s really efficient and easy to modify.