5.2: Function Parameters and Arguments - p5.js Tutorial

preview_player
Показать описание


Timestamps:
0:00 Introduction
1:10 Calling a Function Multiple Times
3:30 Function Parameters
4:57 Initializing the Function Parameters
6:48 Code Example
9:04 Calling Functions with the Proper Arguments

Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound

#basics #functions #arguments #parameters #p5js #javascript
Рекомендации по теме
Комментарии
Автор

You are the most incredible, fun and beautiful person that I ever ever had met. Thank you so much for share all this knowledge. I just don't see your videos because the tutorials. Sometimes my day is going bad and I just open one of your videos and my world around begins to shine. I think this feelings are because im learning at the same time I'm having fun visualizing rainbows and flowers. Thank so much!

lisset
Автор

im reading the Head First JavaScript book. that book, combined with your videos, really makes things "click" for me. if every teacher had your energy and enthusiasm then people would be more eager to learn. keep it up!

zufi
Автор

just stopping in again to say how thankful I am for these videos. So well done. More than half way! I can't wait to do ML next

max_mittler
Автор

Was having the hardest time understanding parameters and why one might use them. Thanks sooo much for this! You're a joy to watch and listen to

Andrea-lfjq
Автор

The lollipop example was very didactic! Thank you for your great service teaching us.

medeirosbrendon
Автор

you explained this beautifully, with real world, simplified scenarios that make way more sense than a bunch of gibberish code. Thank you!

colinsandlin
Автор

Thank you!! Been having a tough time understanding how to define parameters lol. Making it clear that arguments are sent and define the parameters when you call it was like a eureka moment for me.

Yummeosbada
Автор

Finally I understood the terms "parameters" and "arguments". Thank you !!!

vladimirzizic
Автор

Man! This is the only channel where I get answers to all my questions. thank you thank you thank you thank you thank you thank you thank you thank you thank you

nare
Автор

Argument & parameters well defined-redefined-beautifully defined, this video great piece of work helping me to understand same time cleared the confusion.

dushyanttyagi
Автор

Another great vid from the goat. So many people have tried to explain parameters and arguments to me over the years and I could never grasp those concepts. Until today :')

ennwren
Автор

This is the best video explaining function parameters on YT

noelaostric
Автор

You're an awesome teacher! I enjoy watching your videos, really inspiring to learn!

analynaclag-quintos
Автор

The best explanation, this topic was unclear to me for several months, until now... Thank you!!!

vladimirkim
Автор

wow! Finally, you did it in almost 10 minutes :) haha goal reached! No but seriously... those videos are so helpful! Makes me studies even better :)

kimcorpataux
Автор

Your motivation is really inspiring😄. I tried this with the flower, here is the code:

function setup() {
createCanvas(400, 400);
angleMode(DEGREES);
}

function draw() {
background(220);
flower(200, 50, 10, 50, 20, 1);
flower(200, 200, 20, 200, 50, 6);
flower(70, 120, 20, 200, 50, 10);
flower(320, 120, 20, 200, 50, 14);
}

function flower(x, y, w, h, r, n) {
fill("rgb(4, 255, 0)");
rect(x - w / 2, y, w, h);

if (n <= 2) {
n = 3;
}
strokeWeight(4);
for (let a = 0; a < 360; a += 360 / n) {
// point (r*cos(a)+width/2, r*sin(a)+height/2); //Shift to the coordinate origin
fill("rgb(255, 0, 215)");
circle( r * cos(a) + x, r * sin(a) + y, 1.5 * sqrt(r * r * (1 - cos(360 / n))));//last calculation results from the law of cosines
}
strokeWeight(1);
fill("yellow");
ellipse(x, y, 2 * r);
}

Muffin--Man
Автор

My god! Why was this never explained to me like this? I've paid for two other online courses that skipped over this vital piece of information. Thank you.

PaxRufrax
Автор

Even if i'm trying to learn C++ .this helped me a lot to understand how functions work, thanks for that tutorial !

acat
Автор

Watch: wildly talented and engaging teacher makes self deprecating comments about not being creative while creatively unblocking 200k weary students. Dude you are so talented, stop. (and thank you 🙏 )

pozlong
Автор

that is a fantastic video, best explanation I have received after hours of you tube, googling, courses . OMG wow

helzingh
welcome to shbcf.ru