Coding Challenge #112: 3D Rendering with Rotation and Projection

Coding Challenge #112: 3D Rendering with Rotation and Projection

The Coding Train

5 лет назад

199,108 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Moho Khachai
Moho Khachai - 08.09.2023 01:30

Too simple

Ответить
Seth .L
Seth .L - 25.08.2023 23:57

Finally someone actually explained projection matrix's :D

Ответить
TIKTOKS
TIKTOKS - 16.08.2023 13:20

it's like a four dimensional hyperspace

Ответить
KirboFN
KirboFN - 23.07.2023 03:26

Anyone following 4 years later… at the point where you connect the lines, simply in the for v : points loop, save the last screen coordinate in a non loop local variable (as in declared outside) then check, if it has been initiated (had a value) then draw a line between it and the current point

Ответить
rebornreaper
rebornreaper - 10.05.2023 22:57

I like your channel. You have such a great attitude, and you're clearly knowledgeable -- but you also show that it's ok not to know everything. You foster a great attitude towards ongoing learning. 😄👏

Ответить
John223
John223 - 19.02.2023 23:06

I'm want to try to do this with typescript and svg 🤔

Ответить
[deleted]
[deleted] - 18.01.2023 12:32

i hate c++

Ответить
Skullcrusha
Skullcrusha - 15.01.2023 12:34

How can you change it so when you move the cube up, down, left or right, it still spins around its own center instead of the center of the screen?

Ответить
Zeugl Cockatrice
Zeugl Cockatrice - 03.01.2023 01:01

a 3 dimensional cube on a 2 dimensional screen in my 1 dimensional brain

Ответить
Florian Witteler
Florian Witteler - 31.12.2022 00:37

Awesome video! Just what I needed for my advent of code problem

Ответить
gigaprofisi
gigaprofisi - 24.12.2022 08:02

really wish i saw this a year ago

Ответить
Վահե Գևորգյան
Վահե Գևորգյան - 20.12.2022 00:44

Where can i find functions that he has written before and using now?

Ответить
0xirakli
0xirakli - 15.10.2022 01:20

my brain kinda broke and didnt see the perspective version of the cube right at first.

Ответить
Kartoffel Licht
Kartoffel Licht - 26.07.2022 13:35

Love it! love everything! Love coding! Love examples! Love humor! EVERYTHING!!

Ответить
Mark Sam
Mark Sam - 13.06.2022 00:07

I wonder how to draw colored faces so that only front ones are visible

Ответить
emteiks
emteiks - 13.05.2022 14:46

A Giant at work. Thanks for making this video!

Ответить
Lide Studios
Lide Studios - 18.04.2022 19:43

Exactly the type of information I've been searching for -- thanks for taking the time to make this and explain everything! I'll create something epic in the future with this power

Ответить
chadjaa Sofiane
chadjaa Sofiane - 23.03.2022 13:43

in my university they told us to build 3d objects from scratch. you do a crazy things with this library. I can't imagine myself build something similar but I will try

Ответить
Astat At
Astat At - 04.03.2022 22:58

What if I try to rotate not the cube but camera? Then, maybe, I shall use some different rotation matrices or apply it differently or something. If you make part 3 explaining all of that camera rotation and transformations, I will be really happy!!!

Ответить
Misc.Vid.
Misc.Vid. - 27.02.2022 08:32

you are really a genious...i was maing something like this for fun in 2000 year, but i did not reach so far, and with this deep understaning, you are my inspirational mentor , thanks dude

Ответить
lefantastique59
lefantastique59 - 21.02.2022 00:45

This video inspired me to code my own 3D modelisation software for my final school project. So thank you so much!

Ответить
Druid Firmware
Druid Firmware - 16.12.2021 18:26

I did all that, and more in the summer of 1982 or 1983 on a IBM 8088 with a nonochrome monitor !!! All coded in basic, no libraries whatsoever... I was rendering all my projected vertices in arrays, for many rotations or distance change, to be able to display the results faster, because the calculations were done... 4.77 Mhz 640 KB ram...

Ответить
Pupper Gump
Pupper Gump - 06.12.2021 12:47

I got everything right (using cpp) but I have a couple problems.

Firstly, the z values separate the two layers of cube opposite each other. Basically I now have two squares rotating around an empty space.

It also keeps rotating around the upper left corner (the origin). I tried subtracting the point's position with the cube's position and it kind of centered, but it always rotates around with the upper left point pointing toward the rotation point. I cannot get the rotation point to be inside the cube. When I tried, everything froze.

The worst part is that I just did exactly what you did. I can only guess that there are more 3d helping tools in processing, even without the 3d functions.

Ответить
Saif Ullah Usmani
Saif Ullah Usmani - 14.11.2021 19:04

You are amazing 🤩

Ответить
ROHITH Singhu
ROHITH Singhu - 02.11.2021 21:36

Sir can u share this source code?

Ответить
Amm St
Amm St - 02.10.2021 08:17

boring

Ответить
ejskshrvhshsbdbdbddhdh3yejsksksjsksksifbvxhxbdhsjs
ejskshrvhshsbdbdbddhdh3yejsksksjsksksifbvxhxbdhsjs - 24.07.2021 14:53

You r the best teacher

Ответить
BakBak
BakBak - 09.07.2021 00:24

I think you swapped the sin and -sin in rotationY. they should be swapped unlike in rotationX and rotationZ
cos(a), 0, sin(a)
0 , 1, 0
-sin(a), 0, cos(a)

Ответить
sayochi kun
sayochi kun - 18.06.2021 21:47

"Processing, Java based, creative, development, platform thing."

Ответить
silver takana
silver takana - 09.06.2021 23:03

Shiffman “Oh boy! this work too fast. I didn’t want it to work that fast”.

All other programmers drop their mouth

Ответить
Jkauppa
Jkauppa - 29.04.2021 19:58

tf is the pavlov ding dong

Ответить
yHuter23
yHuter23 - 24.04.2021 21:15

Aaaaah I want to learn

Ответить
SmellTheL
SmellTheL - 23.04.2021 13:05

I tried to make my own 3d rendering engine. I now have a crippling fear of triangles. I do not recommend.

Ответить
Ben Nguyen
Ben Nguyen - 11.04.2021 06:05

Do you have any suggestions on how to plot live-data, that comes from the usb/serial-port? P5JS , PixiJS , ZIMJS, TwoJS?

For example, not sure which package would best keep up drawing a simple line graph, as the data that comes streaming in, but I'd LOVE to use P2D, maybe with Python!

Ответить
Seth Mobit
Seth Mobit - 29.03.2021 22:15

Thanks a lot. I was looking for it for two months. I contacted some math teachers but anyone could teach me this. Now I could do a cube in Lua (TIC-80). But I have a question: We can make a rotationY matrix and the cube will spin in its own axis Y. But how can a make two cubes, one spinning in its own axis Y, and a second cube spinning in first's axis Y, such as the second cube is "orbiting" the first one?
Hugs from Brazil
+1 subscriber

Ответить
hamza
hamza - 19.02.2021 04:14

I love your videos and thanks you helped me a lot with that video tho! <3

Ответить
PeachesforMe
PeachesforMe - 18.02.2021 18:15

So, as a person who is doing Computer Science in school. I feel it's safe to say: I hate Libraries.

We're not watching someone Code a 3D - Rotating Cube. We're watching someone use someone elses code to use function to do such a thing. I want to KNOW HOW TO MAKE THE 3D CUBE. Having a function that says "DO everything" is not an explanation on how to make this program. P3D basically makes it so you're actually not doing the work, you're just taking someone elses work and claiming you did it.

Again, I understand the uses of Libraries. It doesn't change the fact that they're fucking lame and lazy. Again, I came here to see how to program a Rotating Cube, what I got was "Use this person's Library because we can't be bothered to show you how this shit is done. BUT we're going to title the video and be deceptive and act like WE coded the cube."


Man, I wish ALL programming came down to just simply using normal words. "I want to Rotate these... so I will use ROTATE. I'm not going to create a function that will rotate this. NOOOOOO we can'
t show you actual programming. We have to show you what Script Kiddies think is programming. "

Ответить
66ThankYou99
66ThankYou99 - 28.01.2021 22:21

I really felt the need to learn how to create 3D from scratch for the sake of my own sanity, so thank you again.

Ответить
Robert Jr. Kibble
Robert Jr. Kibble - 06.01.2021 05:37

ok but how do i rotate projection :(

Ответить
Kartik Gupta
Kartik Gupta - 23.10.2020 10:34

Sir great video btw. I tried to recreate this in raw java but the perspective part isnt working.

Ответить