Тёмный

How to Rotate Shapes in p5.js (translate, rotate, push, pop) 

The Coding Train
Подписаться 1,7 млн
Просмотров 202 тыс.
50% 1

Опубликовано:

 

15 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 161   
@orifl6653
@orifl6653 7 лет назад
I wish you were my teacher in math, English, history, physics and on any other subject
@jeffreychen6591
@jeffreychen6591 7 лет назад
Владимир Путин if he is my technology teacher. That'll be great
@dany2685
@dany2685 5 лет назад
Me too. He has that energy and he s like giving you power :))
@nitinjain3824
@nitinjain3824 4 года назад
i know right...he could really make my learning fun and also ill be able to understand any concept in just a few seconds.
@CarlosAlbertBR
@CarlosAlbertBR 2 года назад
Dan is one of the best coding teachers that I've found here, teaching not only the syntax itself but the most import: how to think. Thank you very much!
@ДенисКолодич-к2м
@ДенисКолодич-к2м 3 года назад
Hi! i am from Russia and i know very little english, but you explain and show it very simply. Thank you for your videos!
@ignaciodelamadrid
@ignaciodelamadrid 5 лет назад
Daniel, you are by far my best programming teacher ever. And I've been programming professionally for 10 years now. You have me motivated and entertained at the same time man. Kudos and thanks a lot. I support you in Patreon, any chance you coming up with a series on design patterns?
@FritsvanDoorn
@FritsvanDoorn 7 лет назад
Welcome back, I've missed your enthusiasm and interesting subjects.
@kefancui3146
@kefancui3146 6 лет назад
s
@aliramyshady
@aliramyshady 3 года назад
when I watch your videos I am not just learning I have fun cause you are very awesome and you are my inspiration and words can't describe how amazing you are
@Akshatgiri
@Akshatgiri 7 лет назад
I agree Daniel...We do have this mysterious bond. I can feel it.
@averycoolgroundhog1117
@averycoolgroundhog1117 11 месяцев назад
This video proved very helpful! It's explaining the code in much less complicated terms (compared to other videos) and truly helps you out as a beginner who had little past experience with coding!
@TheCodingTrain
@TheCodingTrain 11 месяцев назад
so happy to hear!
@laikesagores3258
@laikesagores3258 2 года назад
Hello from Greece, extra extra extraordinary teaching!!!
@TheCodingTrain
@TheCodingTrain 2 года назад
Ευχαριστώ!
@maggiezhu6360
@maggiezhu6360 7 лет назад
Thank you so much for the tutorials! Finally here's the tutorial about rotate() and translate()! I was totally new to programming before watching your videos. Now I could create some interesting things using the knowledge learnt from your videos. Thank you so much for the series!
@bossysmaxx3327
@bossysmaxx3327 4 года назад
dude You're the Best Teacher I've ever seen,
@Somfic
@Somfic 7 лет назад
I don't even code in JavaScript anymore but I just love you.
@kamilbolka
@kamilbolka 7 лет назад
Its Java script in this tutorial
@Somfic
@Somfic 7 лет назад
What'd I say?
@kamilbolka
@kamilbolka 7 лет назад
You edited it
@kippenbout1
@kippenbout1 7 лет назад
"Java" is a whole other language than "Javascript". He is using javascript in this video.
@Somfic
@Somfic 7 лет назад
:P
@RamPrakash-yr6ot
@RamPrakash-yr6ot 4 года назад
I tried the rotate(-angle) thingy, got confused, found this video and now it all makes sense.. awesome
@apocalypse688
@apocalypse688 4 года назад
Thank you man. You saved my midterm assignment !
@noelsnrub1
@noelsnrub1 5 лет назад
This is a very good series. I am doing graphics programming following a college text and RU-vid videos. Normally I can't stay with a video for more than 15 minutes. This one kept my attention for the full 22:54. I developed my own functions for rotation and transformation using the (mostly) trigonometry I learned in 12th grade math so I have a code base (small) of graphics functions already. Going forward, not sure what I am going to use: My home brewed stuff or the functionality demonstrated in this series of videos.
@absolutetrash7982
@absolutetrash7982 3 года назад
The push and pop function literally saved my project tysm for these lessons
@EvilTim1911
@EvilTim1911 6 лет назад
This is the only programming channel that just gives you the raw uncut coding, including mistakes. That's been important for me because I got to see that even people who have been doing this for years and years will make silly little mistakes often and we the viewers get to learn from those little mistakes. When you watch perfectly rehearsed videos on other channels it's easy to get this wrong idea that coding is a really fast, seamless process where you never have to stop and think or double back to fix something. Seeing live coding has been encouraging because I see I'm not the only one having to fumble around a bit before things are working as they should. Basically what I'm saying is, thank you so much, Daniel, and keep up the excellent work.
@TheCodingTrain
@TheCodingTrain 6 лет назад
Thanks for this nice feedback!
@zoeliam898
@zoeliam898 5 лет назад
thank you! now I finally understand how to (and why I need to) use translate and rotate together...!
@subratasaha1312
@subratasaha1312 3 года назад
Hi Dan any video I watch of yours I am completely hooked, the content the way you explain concepts the detail you go into is invaluable, also I think your completely nuts.
@Mr_cl0wn
@Mr_cl0wn 7 лет назад
To be honest your videos are great and please don't edit the video(cutting some parts) because those moment can refresh the mind. i hope you got my point excuse my English please.
@VenomSkywalker.
@VenomSkywalker. Месяц назад
He makes learning so much fun like I love this
@augustolf
@augustolf 5 лет назад
Excellent explanation! Finally, I comprehended how to use p5.js translate and rotate. Thanks!
@mingliangma840
@mingliangma840 2 года назад
amazing video, you are teaching much better than my professor
@alwayssomewhattired
@alwayssomewhattired Год назад
Another fantastic video
@scpresearcherssite1054
@scpresearcherssite1054 2 года назад
THIS has helped me so much. thank you man
@fbmrqs
@fbmrqs 7 лет назад
Great subject, as always. 👊🏻
@michaelbarron6687
@michaelbarron6687 4 года назад
Amazing teaching. Exactly the lesson I needed. As far as I am concerned, YOU are AngelMode. Thank you so much.
@Axecnarf87
@Axecnarf87 4 года назад
Thank you so much for your tutorials and your enthusiasm. It really makes the difference.
@zebini
@zebini Год назад
Awesome method of teaching, keep this up please!!!
@grizzlycougar
@grizzlycougar 7 лет назад
Glad to see you back again, great video as always
@theguyman232323
@theguyman232323 5 лет назад
This would have saved me so much time if i knew rotate rotated about 0,0. Thank you so much!
@nitinjain3824
@nitinjain3824 4 года назад
You have such good teaching skills. Great Job!
@jermainebrayne437
@jermainebrayne437 7 лет назад
He got so much swag
@nbomb823
@nbomb823 2 года назад
BIG LIKE for "pop()" in translate
@sajeevanfuels1980
@sajeevanfuels1980 3 года назад
Thank you so much!!!! You are a masterpiece teacher!
@TheLegoJungle
@TheLegoJungle 7 лет назад
Just in time for my coding class. Thanks!
@louisalainlegerarchundia6176
@louisalainlegerarchundia6176 5 лет назад
got what i came for 12mins, in but I stayed till 22mins cus ur great
@kastelruther
@kastelruther 4 месяца назад
Thanks a lot for this! Is there a way to rotate individual text characters by x degrees? I can easily rotate entire words, but have a hard time doing individual characters... keep up the good work! :)
@deiaraki
@deiaraki 2 года назад
thanks dude. Nicely explained.
@TheCodingTrain
@TheCodingTrain 2 года назад
Thank you for the support!
@xlayrs
@xlayrs 7 лет назад
Thanks for everything :) You're the best! greetings from Mexico
@sputnik4043
@sputnik4043 5 лет назад
QUESTION How can I make a object rotate but only if i press a key....i want it to make a curve like a car
@Diego612010pd
@Diego612010pd 6 лет назад
@The Coding Train I have a very important question/CHALLENGE: How can you shear an object/image using these basic transformations and no DOM, HTML, or CSS??? Love your videos by the way.
@dhruvprajapati127
@dhruvprajapati127 7 лет назад
My exam of computer graphics is tomorrow and this is so helpful so thank you for this video I like your videos...
@TheCodingTrain
@TheCodingTrain 7 лет назад
Good luck on your exam!
@dhruvprajapati127
@dhruvprajapati127 7 лет назад
The Coding Train thank you...
@Ouro17
@Ouro17 7 лет назад
Glad you are back.
@bcanary4252
@bcanary4252 5 лет назад
I love this explanations! Nice vid!
@lingalaakshaya1057
@lingalaakshaya1057 3 года назад
Can you help me, sir? I have a doubt that was "Which function specifies the new position of an object relative to its current position?"
@mmbower1
@mmbower1 6 лет назад
Hey I just want to say I really like your content and it is extremely helpful. Your personality def catches on and makes me laugh! You are an excellent coder. Keep up the great work. One question. How are you using the dom like that to compile your visuals in code?
@davidricardodejesussilva5975
@davidricardodejesussilva5975 3 года назад
Is there a way to invert the image? As if mirroring the image of a person pointing to the right would start to point to the left.
@vivipettiss5832
@vivipettiss5832 Год назад
Me: in a computer science class that doesn't teach me anything Me: maybe I'll find some tutorials on RU-vid *clicks this one* Me: OH MY GOD THIS GUY JUST TAUGHT ME MORE THAN MY ACTUAL COMPUTER SCIENCE CLASS DID IN HALF A YEAR IN 23 MINUTES
@willyecharte
@willyecharte 2 года назад
Great teacher!
@juanpablofloresallende6635
@juanpablofloresallende6635 Год назад
One question, how can I rotate a line about its own axis? You have shown it with a rectangle, but I don't know how to do it in a single line. Thanks for reading this, greetings from Argentina.
@TheCodingTrain
@TheCodingTrain Год назад
See this example! editor.p5js.org/natureofcode/sketches/EFCfyH88E
@codewithryan4646
@codewithryan4646 6 лет назад
This guy is a legend!!!
@julianbullmagic
@julianbullmagic 4 года назад
keep up the hard work
@mrmonkeboy
@mrmonkeboy 4 года назад
Question - if I use translate and rotate on a shape, how do I know if the mouse is over it? Is there a way to find the resulting bounding box?
@praneelmadhuvanesh3770
@praneelmadhuvanesh3770 3 года назад
How do you cancel the rotate if you have code after that you want to stay still.
@juanjoseflores9660
@juanjoseflores9660 3 года назад
How to do Axial Symmetry??? with Processing, video tutorial please!!!... Greetings from Uruguay.
@hero4future
@hero4future 5 лет назад
saved my course this term, i was miserable at this
@adamjskater
@adamjskater 7 лет назад
What's the difference between using the reset transforms function you mentioned vs using push and pop?
@PhilBoswell
@PhilBoswell 7 лет назад
I think that you can nest push() and pop() whereas resetting jumps back to default state every time. No doubt I will be proven right or wrong imminently ;-)
@rosekay5238
@rosekay5238 2 года назад
This guy is the math teacher you wish you had 😂
@andreadinicolantonio4422
@andreadinicolantonio4422 4 года назад
You are amazing.
@mason3358
@mason3358 4 года назад
Are you able to use multiple pushes for different sets of transformations
@chetans4915
@chetans4915 5 лет назад
I'm not able to use rotate function like you showed in the vedio in brackets editor. If possible can you send something useful for me to do Geneva mechanism simulation
@yakupemre1
@yakupemre1 4 года назад
Thank for these funny and useful tutorials. If I want to rotate a rotated line around a point in 3D mode but it is away from origin what should I do?
@chetans4915
@chetans4915 5 лет назад
I'm not able to do this in brackets editor. If possible can you send something useful for me to do Geneva mechanism simulation
@alonattar3836
@alonattar3836 7 лет назад
Great work!
@zabey_otkosi
@zabey_otkosi 2 года назад
Very useful!
@NayRunic
@NayRunic 6 лет назад
best channel ever, love you dan
@bhavyatrivedi6310
@bhavyatrivedi6310 5 лет назад
rotateX function doesnt work, and the console also shows nothing, please help me
@killox3371
@killox3371 7 лет назад
Always great
@mirzunayedali1724
@mirzunayedali1724 4 года назад
when i saw those glasses, my brain knew that shit was about to go down
@n4ut
@n4ut 4 года назад
do you know a script where visual: hold your hand upwards and rotate it like its around an object. kind off 3d
@SHREEVATHSAVMUBEC
@SHREEVATHSAVMUBEC 5 лет назад
Thank you for your video series. How to rotate a line at midpoint irrespective of its length?
@musicgaines7170
@musicgaines7170 4 года назад
is it possible to get p5.js on debian linux, and how would you install/set it up.
@andydedu5884
@andydedu5884 5 лет назад
Why are these videos so hard to find now? Are you remaking them
@szucsadam0527
@szucsadam0527 3 года назад
hi! how do I just turn something 45 degrees? I don't want the rectangle to rotate, just turn it.
@angelcaru
@angelcaru 3 года назад
Use the rotate() function, but use the QUARTER_PI constant instead of a variable
@mike_vahemoubayed8099
@mike_vahemoubayed8099 5 лет назад
I am making a car game using a arduino and a potentiometer and processing this was useful
@blinzi69
@blinzi69 5 лет назад
ok - how can i make this work - im trying to create a game where you fly a rocket straight upwards and can steer left and right while the ship is moving always in the direction its pointing, on the other hand i want to scroll tha camera upwards - im trying to do this all with translate and rotate, and make the ship moving along a vector. will this work?
@blinzi69
@blinzi69 5 лет назад
how can i draw a rectangle at a given x/y position relative to the 0/0 origin of the canvas, while at the same time rotate it around its center with a given angle?
@caitlindressel3516
@caitlindressel3516 3 года назад
king.
@gzoolotb1348
@gzoolotb1348 6 лет назад
?????what is the program you use in this video
@luisarandas
@luisarandas 6 лет назад
Hello Dan, is there a video where you show your setup on dependencies using Atom instead of Processing ide?? Best, Luis
@TheCodingTrain
@TheCodingTrain 6 лет назад
This workflow video might help (but I'm using VSCode now) ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-gJa6wri8YNQ.html (Full playlist: ru-vid.com/group/PLRqwX-V7Uu6Zu_uqEA6NqhLzKLACwU74X)
@wanderwithdaniel
@wanderwithdaniel 3 года назад
Thanks a lot 🙏
@nickricotta3621
@nickricotta3621 5 лет назад
how do you make it rotate around the top right corner
@mirandagil3642
@mirandagil3642 4 года назад
THANK YOUUUUUUU
@dany2685
@dany2685 5 лет назад
Is this working with a regular browser?
@steinerbock
@steinerbock 5 лет назад
Love all your videos! Do you have any materials that explain how to achieve this effect in an array of rectangles?
@PollederBoss
@PollederBoss 5 лет назад
how can you rotate a dynamic object with just radiants?
@Pancake3000
@Pancake3000 4 года назад
This was so helpful lol.
@samyakjain5015
@samyakjain5015 4 года назад
Why are all geniuses named Dan?
@Fragranceandtech
@Fragranceandtech 7 лет назад
You are amazing!!
@su1414Games
@su1414Games 7 лет назад
Are you going to continue the Neural Networks series?
@TheCodingTrain
@TheCodingTrain 7 лет назад
yes, stay tuned!
@joshc6489
@joshc6489 2 года назад
Hi, Love your video (and as others have said your enthusiasm, it's contagious :) ) How can I create a shape (as you've done) and make it draggable?
@nickricotta3621
@nickricotta3621 5 лет назад
hey, does anyone know how to make it rotate from the top right corner
@Miguelhensch
@Miguelhensch 4 года назад
soooo helpfull :)
@kamilbolka
@kamilbolka 7 лет назад
Can you share your Atom settings?
@TheCodingTrain
@TheCodingTrain 7 лет назад
Does this video help? ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-d3OcFexe9Ik.html
@kamilbolka
@kamilbolka 7 лет назад
Thanks. And not sure if you remember, but thanks to you I've created my first game on android. Now, I've created an education app that is meant to teach students on how relations and graph work together. play.google.com/store/apps/details?id=kamilbolka.kgraphs&hl=en_GB
@levizjaperdije8499
@levizjaperdije8499 5 лет назад
AngelMode? is this a game? nice bro "} you are a professor "}
@martinminteguiaga
@martinminteguiaga 3 года назад
ok, where is that merge request for angelMode()
@300mcash2
@300mcash2 5 лет назад
how can you make a vector rotate?
@kencambre
@kencambre Месяц назад
Trying to rotate mansion hand 90 degrees from its time position.
@SergioLopez-ud7gm
@SergioLopez-ud7gm 4 года назад
I'm from Mexico and i don't understand how he use pop and push :'(
@karmaindustrie
@karmaindustrie 5 лет назад
Why is there a matrix? An who is The One?
Далее
How to use scale() in p5.js
8:20
Просмотров 48 тыс.
Coding Challenge #74: Clock with p5.js
20:39
Просмотров 495 тыс.
Coding Challenge 185: Unfolding Fractals
31:04
Просмотров 40 тыс.
Coding Challenge 180: Falling Sand
23:00
Просмотров 971 тыс.
Dear Game Developers, Stop Messing This Up!
22:19
Просмотров 719 тыс.
I coded one project EVERY WEEK for a YEAR
13:13
Просмотров 660 тыс.
Coding Challenge 124: Flocking Simulation
42:27
Просмотров 333 тыс.
Award Winning Animation With Only 20 Lines Of CSS?
6:59