what is the limitation of building a program with p2 or p3? i dont want to learn all this to find myself not being able to actually do what i want cuz of the lag or memory problems

when i deal with vector i have realised that when i dont use translate() function the vector subtract gives a very different result could you please tell me how i can get the same result in vector subtract without using translate (); ?

I don't get why are you subtracting and translating vectors to draw a line. Is that for demonstration ? This works as well and is less confusing I think:

You are a really gifted teacher Daniel! I'm new to coding and Im learning to use C# , but the concepts you teach in this videos are solid gold! Thanks you very much! Greetings from Buenos Aires, Argentina!

There is the Math.hypot(x,y) function which does exactly the same thing as Math.sqrt(x*x + y*y). It's especially designed for calculating distance which means its much faster and it's much more compact than its counterpart.

Please correct me if I am wrong, but you used translate and you made the center point the point 0,0 . Shouldn't you write PVector center = new PVector(0,0); ???? why did you put (width/2,height/2); ????? You have already done the translation :/

"Something we want in our lives is to just be normal sometimes. Actually we don't want to be normal. I actually have no idea what I'm talking about. Who knows what we want in our lives? Vectors. Sometimes we want our vectors to be normal. Forget about out lives, I know nothing about how to deal with what's life, but I do know something about vectors!"

## 25 Comments found

## MrFruture

You're the best! Thank you Daniel!

## SIMuTech

what is the limitation of building a program with p2 or p3? i dont want to learn all this to find myself not being able to actually do what i want cuz of the lag or memory problems

## Furrane

Half the video is a vector field and you don't use it to demonstrate normalised vectors ? Come on xD

## Eduard Atonga

This is extremely useful thank you as a physcist this gives me a great way to simulate what i do with my math or experiments I cant do in real life.

## corey333p

So your wallpaper has normalized vectors?

## Juneza Niyazi

when i deal with vector i have realised that when i dont use translate() function the vector subtract gives a very different result could you please tell me how i can get the same result in vector subtract without using translate (); ?

## Augusto Gava

Caralho!! Finamente entendi o que é normalizar um vector!

## Qwerty

I don't get why are you subtracting and translating vectors to draw a line. Is that for demonstration ? This works as well and is less confusing I think:

PVector start = new PVector();

void setup(){

size(640,480);

background(255);

start.x = width/2;

start.y = height/2;

}

void draw(){

background(255);

strokeWeight(2);

stroke(0);

noFill();

//translate(width/2, height/2);

ellipse(start.x, start.y,4,4); //center

PVector mouse = new PVector(mouseX, mouseY);

//PVector center = new PVector(width/2, height/2);

//mouse.sub(start);

line(start.x, start.y, mouse.x, mouse.y);

fill(0,255,0,50);

mouse.sub(start);

rect(start.x, start.y, mouse.x, mouse.y);

}

void mouseClicked() {

start.x = mouseX;

start.y = mouseY;

}

## Shockszzbyyous

okay, so i got totally distracted when i started coding! and now i have build this ..

https://github.com/Duality4Y/cvector

## Ahmad Sebaq

Your videos are amazing and easy to understand. Thank you Daniel!

## Oscar Mejia

Your videos are absolutely insightful! I thought mathematica was cool, but processing is the real deal !

## Alexis Echemendia

Best math ever!!!

## valinforeststorm

is there a way to use PVectors in javascript?

## valinforeststorm

this video did help because you showed the math of the PVector and I made the same thing in javascript

## Jermany 84

You kick ass sir. I understand vectors at an abstract level and you are helping me grasp it in a very realistic way. Thank you.

## German Gilabert

You are a really gifted teacher Daniel! I'm new to coding and Im learning to use C# , but the concepts you teach in this videos are solid gold! Thanks you very much! Greetings from Buenos Aires, Argentina!

## Pompiduskus

while( this.x > 1 || this.y > 1 ){

this.x *= 0.999; this.y *= 0.999;

}

## Invalid571

There is the Math.hypot(x,y) function which does exactly the same thing as Math.sqrt(x*x + y*y). It's especially designed for calculating distance which means its much faster and it's much more compact than its counterpart.

## Aris Melachroinos

Please correct me if I am wrong, but you used translate and you made the center point the point 0,0 . Shouldn't you write PVector center = new PVector(0,0); ???? why did you put (width/2,height/2); ????? You have already done the translation :/

## ManuAlvarado22

This was enlightening <3

## JusaStronomer

Depending on which ad you watched, it's like Shiffman is reacting to it in the first 2 seconds of the video! XD

## Ahmaykmewsik

"Something we want in our lives is to just be normal sometimes. Actually we don't want to be normal. I actually have no idea what I'm talking about. Who knows what we want in our lives? Vectors. Sometimes we want our vectors to be normal. Forget about out lives, I know nothing about how to deal with what's life, but I do know something about vectors!"

## Efe DBy

You are awesome, it sounds strange but you saved my life😁😁

## Harry White

These videos are amazing, thank you for making them.

## Michael Albert

watching all these videos at 1.25x or 1.5x speed = endless entertainment