Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

164
Views
Rellene la forma personalizada (vértice) con puntos en p5

Tratando de llenar esta forma roja personalizada con puntos como la elipse. Ver imagen/ejemplo de código a continuación. Cualquier ayuda sería apreciada.

Este Poblar un círculo con puntos, usando sesgo hacia el borde del círculo explica cómo poblar una elipse, pero ¿cómo hacer la misma técnica en una forma personalizada?

Imagen con explicación de lo que estoy tratando de hacer

 function setup() { createCanvas(750, 750); background(0); noStroke(); fill(255); noLoop(); } function draw() { translate(width / 2, height / 2); for (let i = 0; i < 5000; i++) { let theta = random(0, TWO_PI); let h = randomGaussian(3.3); //experiment with different means let r = (exp(h) - 1) / (exp(h) + 1); let x = width / 2 * r * cos(theta); let y = height / 2 * r * sin(theta); ellipse(x,y,1,1); } // Trying to populate this custom shape with dots like the above ellipse beginShape(); fill("#ff0000"); vertex(179, 136); quadraticVertex(245, 30, 400, 140); bezierVertex(430, 360, 174, 306, 176, 211); endShape(CLOSE) }
 <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.2/p5.js"></script>

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!