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; }
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.
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.
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.
This channel is the best thing that has happened to UA-cam and open education in years
I think for this tutorial a text like "HELLO" would be a good object because you can see the mirroring very easily
I just want to say that you're a great person and I look up to you.
I missed your videos good to see you back
Hello from Greece. Thank you!
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;
}
Glad to have you back Dan! :)
This 8min video is better than my 5months college course
Interesting. Never thought of a negative scale. Thank you!
i really miss this kind of videos nowadays u only upload steams about ml
awesome explanation
Thanks!
Thank you for the support!
Thank's for explaining this mindblowing function xD
Glad to see you
thanks
you are pro in code keep it up
Yeeeees!!!
I find your viedo so great ,thank you
Thanks :D
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.
Hay, what's about Neural Networks tutorials? I miss them)
They're coming, stay tuned!
I miss them too :D
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.
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;
}
}
This video has the best like-dislike ratio I have ever seen!
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?
I put the video on 2x speed so I could learn twice as fast
You're funny I love you so much (by the way nice beard)
How can we scale the mouse coordinates?
what does (mousex/100) meaning?? is it different from a simple (mousex)??
mouseX simply has too big value , dividing by 100 reduces it to quite less , for example 350 is reduced to 3.5
I want to learn too much things from you
Sir my mob no. Is 8917203678
I dont know if you will believe me or not but i am a biggest fan of you
Sir,i hope you will contact me!!!
@@niharranjanbhuyan9839 you shudn't distribute your personal details on social platform
What is java script ou c++ ou c# please
clash blue star tu es français ?
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.
Sir tell me your fb name please