Python 3D Graphics Tutorial 13: Understanding Orientation in Three Dimensional Parameter Space

preview_player
Показать описание
You guys can help me out over at Patreon, and that will help me keep my gear updated, and help me keep this quality content coming:

In this video we show step-by-step instructions on how to understand Orientations and Axis parameters in Vpython. We have already learned how to translate an object in space, and in this lesson we begin to look at rotations. I do not assume you are an expert, so these lessons are designed for complete beginners.
#Python
#Lessons
#Graphics
Рекомендации по теме
Комментарии
Автор

I AM LEGEND!! One point to notice is when you set the steps to 1000 in the last for loop (returning back to the starting point) the speed will be a little slower because the distance traveled is lesser (three-fourths of 2 pi), so I set the steps to 750.
Thank you for all these lessons!

anishhansoge
Автор

I am Legend. Thank you, Paul, you are really a great teacher ! I did my clock in a minimalist mode, but it works. What you said about parameters design and radius was very useful to me. So I did it in such a way that it does not break even if the radius is changed:

clockFace = cylinder(axis=vector(0, 0, -.01), radius=1)
rd = clockFace.radius

for nbTicks, size in ((13, .1), (61, .04)):
for theta in np.linspace(0, 2*np.pi, nbTicks):
ax = vector(rd*cos(theta), rd*sin(theta), 0)
box(axis=ax, pos=ax*.9, size=vector(rd*size, rd*.015, .01), color=color.black)

jeas
Автор

You are a great teacher! I learned Python from you, sketchup with which I designed my house... there is no one like you.

YM-qfiz
Автор

I am Legend!!! I couldn't make it work without your teaching skills. Thank you, I learned a lot!

shatterism
Автор

I am legend, but it's a team effort as usual between me and Paul, who is the best teacher I have had.

steveholt
Автор

I am legend. Managed to do the homework. Thanks for being such an excellent teacher.

ecassar
Автор

Ek is nog steeds 'n legende. The lawn chairs were so impressed, they started spinning.

gordonspond
Автор

I AM LEGEND! It took a while, but I finally made a clock. Thanks for the most excellent lessons, Paul. I can't wait for more!

cbrombaugh
Автор

I had a lot of fun with this one! I commented out all the arrows and just watched the ball draw the trails in empty space. pretty cool! Thank you very much!

wayneswan
Автор

This was a very interesting lesson, I really enjoyed learning and seeing the way vpython allows us to play like this! Haha now I am dreading trying to figure out how to make the clock face you asked for - at least I am old enough to know what an analog clock looks like! This is an interesting project, so off to figure it out. Thank you once again.

pokerface
Автор

I was pretty sure that jump was going to be an issue and I actually made mine go 5pi/2 for each of my motions to smoothly transition between planes. Also, the trail option is awesome!

chris
Автор

Thanks for another great lesson Paul. It took me a little time, but I finally figured it out. These "old" brain cells are a little rusty!!

leeg.
Автор

I fixed by actually starting at np.linspace(np.pi/2, 2*np.pi, 1000) in the XY. then i drove back to XZ to YZ with another for loop when I got to this point, np.linspace(0, np.pi/2, 250) brought me back full circle to start while loop again.

Bubby
Автор

you are the best teacher i love you mister

josueruiz
Автор

I am legend ! Such a great lesson looking forward to the next :)

daviddeegan
Автор

I got it to work, but I was not able to make it drive to the next arrow repeatedly. No matter how I worked it out to go to the next arrow, I just kept pushing the jump over to the next round. I couldn't get it to flow symmetrically on every rotation for infinite play. (Edit: yeah. I don't know why I didn't think to add another "for" loop. I just kept trying to modify the linspace of the 3 "for" loops I had.

wayneswan
Автор

I am legend. Thanks for another great lesson. :)

harrison
Автор

For the ball position I did ball.pos=pointer.axis.

Godsbeloved
Автор

I am legend and I also made mine look beautiful like yours without the ugly jumping on axis. Great lessons

Godsbeloved
Автор

U are the baddest, just too more than good, I which u could teach us website development

kekekeernest