How to use scale() in p5.js

  Рет қаралды 49,042

The Coding Train

The Coding Train

Күн бұрын

Пікірлер: 44
@chrblubb
@chrblubb 4 жыл бұрын
This channel is the best thing that has happened to KZbin and open education in years
@sadhlife
@sadhlife 7 жыл бұрын
I just want to say that you're a great person and I look up to you.
@superdepressif6047
@superdepressif6047 7 жыл бұрын
I missed your videos good to see you back
@BKDREAM09
@BKDREAM09 2 жыл бұрын
Thanks!
@TheCodingTrain
@TheCodingTrain 2 жыл бұрын
Thank you for the support!
@laikesagores3258
@laikesagores3258 2 жыл бұрын
Hello from Greece. Thank you!
@tomburris8380
@tomburris8380 7 жыл бұрын
Glad to have you back Dan! :)
@ChristianSchmid
@ChristianSchmid 8 ай бұрын
I think for this tutorial a text like "HELLO" would be a good object because you can see the mirroring very easily
@FritsvanDoorn
@FritsvanDoorn 7 жыл бұрын
Interesting. Never thought of a negative scale. Thank you!
@divyanshjain5383
@divyanshjain5383 4 жыл бұрын
awesome explanation
@Ark-ju2gt
@Ark-ju2gt 7 жыл бұрын
Thank's for explaining this mindblowing function xD
@cleverninja5162
@cleverninja5162 4 жыл бұрын
you are pro in code keep it up
@etemkaandelibas3649
@etemkaandelibas3649 7 жыл бұрын
Glad to see you
@erich2s_0103
@erich2s_0103 3 жыл бұрын
This 8min video is better than my 5months college course
@Worldcamping91
@Worldcamping91 6 жыл бұрын
I find your viedo so great ,thank you
@mohammadfarhad8617
@mohammadfarhad8617 5 жыл бұрын
I just want to know how to increase or decrease the size of the object, along the y-axis. example:-at the top the is object is small and at the bottom the object is large.
@virentovoshe6773
@virentovoshe6773 6 жыл бұрын
How can you have 2 simultaneous rotations at the same time if the viewport is being displace. Unless there are more than one view port?
@hijakyung
@hijakyung 2 жыл бұрын
thanks
@jorgenisjobo8667
@jorgenisjobo8667 7 жыл бұрын
Yeeeees!!!
@renecura
@renecura 6 жыл бұрын
Hi Daniel, I'm struggling with a problem and can't figure out the solution. By applying sequence of lines, translations and rotations, I'm making turtle drawings (You know, L-Systems) and I'm trying to "auto-fit" the resulting drawing inside the canvas, but I don't know how to apply the proper scale after all the transformations. Any idea or advice? Thank you.
@xlayrs
@xlayrs 7 жыл бұрын
Thanks :D
@aaronledesma5444
@aaronledesma5444 6 жыл бұрын
How can we scale the mouse coordinates?
@nouserjjj
@nouserjjj 5 жыл бұрын
i really miss this kind of videos nowadays u only upload steams about ml
@Muffin--Man
@Muffin--Man 5 ай бұрын
This allows you to create illusions of 3d rotations: let a= 1; function setup() { createCanvas(400, 400); rectMode( CENTER); } function draw() { background(220); let x=map( mouseX, 0,width, 1,4); let y=map( mouseX, 0,height, 1,4); translate( 200,200); rotate(frameCount*0.01); scale(-cos(a/4) ,sin(a/4)); scale(x,y); rect( 0,0,50,50); a+=0.1; }
@Andy-bz9cb
@Andy-bz9cb 3 жыл бұрын
what does (mousex/100) meaning?? is it different from a simple (mousex)??
@abhayagarwal5097
@abhayagarwal5097 3 жыл бұрын
mouseX simply has too big value , dividing by 100 reduces it to quite less , for example 350 is reduced to 3.5
@جبهةلبنانية
@جبهةلبنانية 6 жыл бұрын
You're funny I love you so much (by the way nice beard)
@vadsavin
@vadsavin 7 жыл бұрын
Hay, what's about Neural Networks tutorials? I miss them)
@TheCodingTrain
@TheCodingTrain 7 жыл бұрын
They're coming, stay tuned!
@su1414Games
@su1414Games 7 жыл бұрын
I miss them too :D
@clashbluestar3099
@clashbluestar3099 7 жыл бұрын
What is java script ou c++ ou c# please
@CP-nt8ng
@CP-nt8ng 7 жыл бұрын
clash blue star tu es français ?
@goldmanlee8403
@goldmanlee8403 7 жыл бұрын
JavaScript (not to be mistaken with Java) is a web functional language. C++ is a inherited super class of C and with C is generally used to make hardware, low-level systems or kernels and applications. C# is a language under the .NET framework by Microsoft and is generally used for business applications or Unity games.
@falkelh
@falkelh 4 жыл бұрын
This video has the best like-dislike ratio I have ever seen!
@pietarikellokumpu5423
@pietarikellokumpu5423 5 жыл бұрын
Really helpful and informational videos! Thank you! I applied these transformation tutorials to processing learning and here's the outcome: //ZZOOOOM float angle = 0; float depth = PI; float vari = 0; void setup(){ size(400,400); rectMode(CENTER); noStroke(); fill(244,200,100); rect(100,100,200,200); } void draw(){ background(vari); pushMatrix(); translate(200,200); scale(cos(depth)); fill(255,40,20); ellipse(0,0,300,300); popMatrix(); pushMatrix(); translate(200,200); rotate(angle/cos(PI/10)/10); scale(sin(depth)* 12); fill(200, 0, 150,100); rect(0,0, 100, 100); fill(252+vari,186+vari,3+vari); rect(0,0, 50,50); popMatrix(); pushMatrix(); translate(200,200); scale(sin(angle/50),sin(angle/50)); rotate(-angle* 0.2); fill(40, 200, 100,150); rect(0,0, 300, 300); popMatrix(); pushMatrix(); translate(200,200); scale(sin(angle/20),sin(angle/20)); rotate(angle* 0.1); fill(255, depth, depth,150); rect(0,0, 300, 300); popMatrix(); pushMatrix(); translate(200,200); scale(sin(angle/200),sin(angle/200)); rotate(angle* 0.1); fill(255, 20, 200,150); ellipse(0,0, 300, 300); popMatrix(); angle = angle +0.08; depth = (depth + 2 * angle)/10; vari = vari + (sin(angle/200)); if(vari>270){ vari = vari-1; } }
@natwatgamer2805
@natwatgamer2805 4 жыл бұрын
I put the video on 2x speed so I could learn twice as fast
@niharranjanbhuyan9839
@niharranjanbhuyan9839 7 жыл бұрын
I want to learn too much things from you
@niharranjanbhuyan9839
@niharranjanbhuyan9839 7 жыл бұрын
Sir my mob no. Is 8917203678
@niharranjanbhuyan9839
@niharranjanbhuyan9839 7 жыл бұрын
I dont know if you will believe me or not but i am a biggest fan of you
@niharranjanbhuyan9839
@niharranjanbhuyan9839 7 жыл бұрын
Sir,i hope you will contact me!!!
@abhayagarwal5097
@abhayagarwal5097 3 жыл бұрын
@@niharranjanbhuyan9839 you shudn't distribute your personal details on social platform
@niharranjanbhuyan9839
@niharranjanbhuyan9839 7 жыл бұрын
Sir tell me your fb name please
9.3: More about Transformations - p5.js Tutorial
8:11
The Coding Train
Рет қаралды 27 М.
How to Rotate Shapes in p5.js (translate, rotate, push, pop)
22:55
The Coding Train
Рет қаралды 205 М.
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 958 М.
What was Coding like 40 years ago?
29:05
The Coding Train
Рет қаралды 1,8 МЛН
Coding Challenge 180: Falling Sand
23:00
The Coding Train
Рет қаралды 1,1 МЛН
Coding Challenge 166: ASCII Text Images
22:42
The Coding Train
Рет қаралды 1,1 МЛН
Getting Started with p5.js
16:16
Web Bae
Рет қаралды 4,6 М.
Coding Challenge 171: Wave Function Collapse
1:18:37
The Coding Train
Рет қаралды 564 М.
Making Simple Patterns in p5.js
13:05
Steve's Makerspace
Рет қаралды 23 М.
the TRUTH about C++ (is it worth your time?)
3:17
Low Level
Рет қаралды 828 М.
Introduction to shaders: Learn the basics!
34:50
Barney Codes
Рет қаралды 388 М.
Apple ][ Coding Challenge: Fractal Tree
35:35
The Coding Train
Рет қаралды 386 М.
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН