Python 3D Graphics Tutorial 6: Animating 3D Objects by Changing Dimensions in Visual Python

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 animate 3D designs and models in vpython, (visual python), and how to bring your models to life. In this example I start with a simple parameter. The graphic is animated by changing its dimensions. I do not assume you are an expert, so these lessons are designed for complete beginners.
#Python
#Lessons
#Graphics
Рекомендации по теме
Комментарии
Автор

I've been thinking about Arduino with a temperature sensor and with a vpython animation of the thermometer. Very exciting. See you tomorrow.

opalprestonshirley
Автор

Good lesson, thanks Paul! (Now back to the checkerboard! 😊)

leeg.
Автор

Another great lesson. I parameterized it using radius and length. Looks great no matter what size I change.

petefontana
Автор

I've been thinking about this from a long time about how to integrate arduino with a software. But dint find any proper videos for it.. 😍blessed to have your channel on youtube. Thank you

aniketagarwadekar
Автор

Hi Paul,
Nice series!
Small correction on the for loops: they count from start up to finish (not including), as you already noticed.
(That is something silly and illogical in Python. Good ol' BASIC does that much better. Also with floats....)
So yes, the first loop counts: 1, 2, 3, 4, 5.
But the second loop counts: 6, 5, 4, 3, 2. Which works out nice for the animation, btw.

And for more smoothness, I would just use a for loop with a larger range and then divide that to get the size.

Cheers!

jann
Автор

I had fun with this lesson! I decided to try and implement threading.
I ran two threads. One running a length function & a second running a opacity function.
The results were really cool!
For some reason it doesnt seem to run as smooth as before. But I will debug!

Thanks AGAIN!

NOS
Автор

after as many video's as I've been through with you, you'd think I could make the cylinder fade in and out and grow and shrink at the same time. but for some reason, I'm coming up short. I'm determined to figure it out! I know its going to be a combination of for loops and if statements thought.

wayneswan
Автор

This is my homework from lesson 6. It is a simple thermometer without a glass bulb or tube. The link for the video and code on this is available at:

Lehibob
Автор

Very nice this video is three in one
With one For loop we can do many things...
Thanks dear sir 💞💞💞

mehdikrishanbutan
Автор

great series! Is there a way to import object from fusion 360 and animating it with Visual Python?

eyal
Автор

thank you very much for your clear and concise explanations, however I wanted to know if it is possible to create an STL file using VPython

reagankabange
Автор

Great lesson! I have checked my code over and over pertaining to your initial cylinder changing length but I have an issue. The cylinder always starts out a certain radius, then it seems to run the first 'for loop' and then the radius shrinks and then the rest of the code runs with the new radius back and forth. If I change myPiston.length to myPiston.radius, the length starts out at 3 but then as the 1st 'for loop' runs, the length shrinks then the rest of the code runs fine. So, for example, radius is 1 and length is 3...Run code; cylinder starts at r of 1 and l of 3, stretches to 6, then radius shrinks, then cylinder's length properly expands and shrinks. So strange

briangraham
Автор

Was actually able to get a bulb, thermometer + 'mercury" going up and down. However coding was a bit ugly and I will await your no doubt more elegant solution.

neilausten
Автор

I made the bulb with the mercury going up and down, but it doesn't start the way I want it to. I suppose your solution will show me what I am doing wrong. Many thanks for all your work on these most excellent lessons, Paul.

cbrombaugh
Автор

Waiting for your numPy tutorial series.

h.w.k.ishara
Автор

Hi Paul, I have been having fun with the homework and have a nice animation coming along. A couple things. First can you recommend a good way to screen capture video that is free and does not have a steep learning curve? Second am I mistaken that YouTube does not allow links in the comments? Thanks again for the great videos.

keithlohmeyer
Автор

Why exactly did we use numpy. Couldn't this animation also be done using for loop?

mannatkaur
Автор

I did it . I input a temperature, it raises to the input temperature and when reaching, it displays it

MrDombev
Автор

Hey, thanks for the lesson, everything works great, but the box and ball from last time are still there, I tried rebooting and closing the previous project, but they are still there. The sphere from this project works just fine but the box and marble from last time still interfere. What might cause this, glitch maybe? Thank you.

architjain
Автор

Here is my attempt at creating a thermometer as homework from lesson 6 -


I am looking into adding scale markings, perhaps numbered.

pokerface