2.4: random() Function - p5.js Tutorial

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


References:

Timestamps:
0:00 Welcome back!
0:47 What is the random function?
2:10 Let's try it out!
4:58 What if we use random() in draw?
6:16 Let's try making something else.
7:10 How about using only 1 argument?
7:42 Built in width and height variables.
8:51 Ideas! What could you make?

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

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

Daniel I watched A LOT of your videos back in 2017-18 when I was just starting out my major in college and I also read the NOC book. And now I've been a software engineer for 6 months! You inspired me so much I don't think I would have gotten this far if it wasn't for your videos. I just wanted to remind you that you're doing an amazing service for all of us here

vikingthedude
Автор

Daniel made "random()" a super star in a lot of his videos.

goldthumb
Автор

I love your teaching style and personality! I was really scared of programming but now I find it not that hard and a lot of fun!

nono
Автор

Hello Daniel, sending gratitude your way for these videos. You have the perfect personality to liven up an otherwise dull subject matter. I’ve been trying to learn JavaScript for a couple years, but keeps getting buried. These videos are truly a gift to the world!

asymptoticSystemKey
Автор

I am curious who'd dislike the video and why... 🤦🤦🤦... it's great stuff man... awesome!!!

sushilkalsekar_SVK
Автор

not sure if you still read comments on this video but i learned a lot about the random function from this video. i remade the house randomizer and the painting program and i feel i learned a lot of new stuff from just that

HeadRedShot
Автор

Hello Ser, I am glad that I found your youtube Channel. I was never Excited to learn about coding before, however from what you are teaching I was blown my mind. Thank you for sharing and teaching :) All the best.

TuanNguyen
Автор

your teaching style is so dynamic and funny. Thanks for sharing this knowledge in a simple way.

marianaalvarado
Автор

Hey, my brother used to be a patreon and he learned alot of things from you so i got inspirated by him and i started learning codiing aswell!Your videos are so much fun and i just want to say that i appreciate and love what you to do! Ive learned so much things in just 12 episodes of these series! And again thank you so much for what youre doing

borimirdimitrov
Автор

As I go down these p5.js videos im also getting in that spaced repetition with some JS also... again thank you.

willbdev
Автор

This video is 2-3 months old but i got its notification right now!!

bhavyabadhwar
Автор

Thank you for doing this!!! Greetings from Germany!

Incognito-xhze
Автор

I would really like to participate in this assignments he gave.. and have them react to them or grade it😅 Im a complete newbie in this I would love to do this.. hopefully..
the passion u show im every of your videos I would like to have and experience it too while also sharing what you taught.. this is the course that I would gladly pay in a school❤️

VinCent-ezzs
Автор

Amazing production quality and content!

BrendanMetcalfe
Автор

I can´t believe I make it this far, and still feeling so interested to continue

nioniostopmo
Автор

I remeber a progran I wrote in high school generated 100 random buildings with windows in a grid. each window had a ranom chance of being lit.

franchello
Автор

Now I have a better understanding of setup() and draw()

Troy-olfk
Автор

Why am I going to college when I could just be learning from the coding train

CROXoDyLE
Автор

if you need a number without a decimal use: "floor(random())" or "ceil(random())" or "round(random())" to round up, down and to nearest respectively

Joevim
Автор

function setup() {
createCanvas(400, 400);
background(0);
}

function draw() {
noStroke();
r = random(100, 255);
g = random(100, 255);
b = random(100, 255);
fill(r, g, b);
circle(mouseX, mouseY, 24);
}
function mousePressed() {
noStroke();
fill(r, g, b);
circle(mouseX, mouseY, 24);
}

rafaelcallejo
join shbcf.ru