Share your repls and programming experiences

← Back to all posts
any dimensional cube
benji10 (16)

The program will create a cube in any dimensions and display it. repl.it will only allow up to 5 dimensions though. Press "p" to toggle perspective which could change the whole view. Press "space" to only show verticies. My second repl. Have fun!

Commentshotnewtop
CodingCactus (3030)

awwww, it doesn't work with 1 dimension :(

FlynnRushtone (1)

@CodingCactus no, it kind of just crashes.

CodingCactus (3030)

how can you have 5 dimensions, that doesn't make sense?

benji10 (16)

@CodingCactus it's just visualising what a 5D cube would look like.

CodingCactus (3030)

@benji10 ok, I'm just confused by how you could have a 5D object, could you explain it to me? :)

benji10 (16)

@CodingCactus i'm pretty sure this is all theoretical. But this is visualising what it would look like. I can't really explain, so i think the best bet is to look it up online.

xxpertHacker (388)

@CodingCactus There's an infinite number of dimensions. Now this is gonna sound crazy, but here I go.

You know how you can look at a 2D image and see everything at once? If I made a 2D box you'd be able to see all sides, inside and outside? Well that's because you're one dimension higher than 2D.

Do you know what that means?

A 4D being can see inside and outside of a 3D cube at the same time. Contemplate that for a bit. You should understand what that means for 5D then.

We, as 3D beings, aren't intended to conceptualize higher dimensions, but some can with relative easy, while others struggle.

CodingCactus (3030)

@StudentFires i'm confused what else there could be, other than height, width and depth?

xxpertHacker (388)

@CodingCactus It gets very complicated. I believe that time is considered to be the 4th dimension.

xxpertHacker (388)

Aww, I wanted to finally see a 1 dimensional object. ahh whatever, definitely worth the upvote! Good work!

CodingCactus (3030)

@StudentFires a 1d object is just a length (i.e. a line)

xxpertHacker (388)

@CodingCactus Nope, a line is 2D. That is what I can't get about 1D. There can't be 1D objects. 1D is more of a concept.

CodingCactus (3030)

@StudentFires no, 1d is one dimension like height is 1d
i believe

xxpertHacker (388)

@CodingCactus Lies, the 1D line is still 2D, we can measure the width of it. It's width needs to be 0 or NaN, then it would be 1D, but also unseeable.

That 0 is totally incorrect.

xxpertHacker (388)

@CodingCactus That is how it is in mathematics, but math is just a human constructed conceptual system that can be used to assist us with physical, natural objects.

Those are the conceptual dimensions.

CodingCactus (3030)

@StudentFires ik about the 0, it's just a picture off the internet, but I think of 1d like one of the edges of your garden or something?

xxpertHacker (388)

@CodingCactus Here's the thing, look at this character:

|

It is a line, right? Of course it is!

But... we can measure it's width, thus it is a thin rectangle, thus 2D.

CodingCactus (3030)

@StudentFires yes, but what is the width of one of the lengths of your garden?

xxpertHacker (388)

@CodingCactus Well, I don't have a garden, but a normal 2D object's length can be measured, it is an attribute of the object (garden), but it cannot exist on it's own. It is a real thing though.

Thus we wouldn't be able to see it.

xxpertHacker (388)

@CodingCactus Like I said, stuff gets complicated fast.

CodingCactus (3030)

I give up. Some of my brain just fell out of my ear, so i'm going to stop now.

@StudentFires

xxpertHacker (388)

@CodingCactus To a being of the dimension, eg: square 2D being, or 3D being, cude, the object would appear totally normal to the being. As we are 3D beings, everything <= 3D is "normal" for us. We aren't supposed to perceive objects of 0D < nD > 3D .

benji10 (16)

@CodingCactus good that my 5D cube looks like that one! I didn't actually know what a 5D cube would look like.

xxpertHacker (388)

@benji10 I don't blame you, it's not every day you look at 4D+ objects, is it?

DannyIsCoding (663)

The 4D cube makes my brain hurt. Love the animation!

JonathanBrazier (11)

How did you detect when p was pressed?

benji10 (16)

@JonathanBrazier You use keyboard bindings. For Turtle, you can say
wn.listen()
onkey(function, "p")

or

wn.listen()
onkeypress(function, "p")

if it's a later version of python.

JosiahKnisely (27)

My mind just broke by looking at a 10d cube.

benji10 (16)

@JosiahKnisely wait, you can see a 10D cube?!

benji10 (16)

@JosiahKnisely I thought repl.it couldn't handle more than 5

JosiahKnisely (27)

@CodingCactus It was just off the internet, not from Repl.it.

JosiahKnisely (27)

Ahhh, so MIND BLOWING!