This code truncates a blue cube with red truncation surfaces. It was designed to work with a parameter ranging from zero to one, but that range doesn’t work. Ranging from about 1.4 to about 2.4 seems to work, but I don’t know why.
This one does what you want I think:
https://www.desmos.com/3d/vpl9apfcih
Yes, thanks! I appreciate your help!!
it might be about a variable that doesnt(according to other lines) exist at 1-0?
edit:(im so sorry if it didnt work
I think I figured it out: It’s on line 9 where P gets the definition of Xx + Yy + Zz + sqrt(3)*(t-1)
Where t-1 cannot obviously be less than or equal to 0 or anything… and when we make t 0<= t <= 1 that won’t work. So yes michael/bhssingul you are correct.
i had no idea that my profile showed my actual name!you almost gave me a heart attack when you said michael! oh well. great job figuring out the root of the problem though,i probally couldnt have done that myself
Haha lol. I was a little dubious when I was thinking if I should reference you as Michael so I decided to include your username too.
Thanks. And I bet you could’ve found it too. Not sure why t-1 has to be >0 though.
its okay,it wasnt that bad of a heart attack ![]()
you almost gave me a heart attack
Let’s not give other people heart attacks on an online forum ![]()
![]()
@Guzman_Tierno nailed it. THANKS!!! I wasn’t thinking Manhattan distance. Also, locking the viewport helped.
I liked your creation. I like how you used X, Y, Z … really cool idea.
Thanks. I flipped t to start with no truncation at t=0. Delightfully, t=0.5 corresponds to full rectification, i.e., cubeoctahedron. Use of the max function feels clever but sneaky. Here’s my latest:
Why did we multiply x against X? What’s X? I have basically no experience in the 3d calculator.
Any first octant’s plane is 0=x+y+z-d, where d controls the position of the plane. Other octants use x+y-z, x-y+z, x-y-z,… . X, Y, and Z contain +1/-1 in all 8 combinations. Desmo treats them as 8 concurrent specifications.
Yes … and @NTMDev It is important to remember that Desmos scans all the vectors X, Y and Z simultaneously, so you get all the combinations of +1 and -1’s.
This way with the parameter t you control the 8 planes that move towards the origin …
But aren’t we dealing with a cube? What does vectors have to do with it? And aren’t there only 6 planes on a cube?
So … yes, we’re dealing with the 8 planes that truncate the 8 corners of the cube.
The cube is given by: max(|x|, |y|, |z|)<1
@NTMDev a cube only has 6 sides but 8 vectors,and if i may say so it appears that the vectors are the starting points
Exactly, as @bhssingul said if you have a vector, say (1, 1, -1), it corresponds to a corner of the cube but you can also use it to create a plane orthogonal to it by writing the equation:
1x + 1y -1z = t.
Ah and they all extend from the origin, correct?