mardi 30 avril 2019

How to generate random coordinates between two straights?

I have a vector with fixed coordinates, and given an increase in the Y axis (down and up) that determines me a region, I need to calculate random coordinates.Image by the vector (black) coordinates and random coordinates (blue)

I can generate a function to determinate the straights between the region i need to work. But i dont know how to generate random coordinates that belong to the region i need.

I'm looking for ideas for how to implement it.




Aucun commentaire:

Enregistrer un commentaire