CodingTrain / CodingTrain/Suggestion-Box
[Quantum Continuum]: Non standard idea to draw a Circle
- Vorherrschende Sprache
- Keine Sprachdaten
- Sterne
- 570
- Forks
- 85
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
# Non standard idea to draw a Circle
## Algorithm formula
**Note: Clicking on image below will open a video on YouToBee.**
[](https://www.youtube.com/watch?v=cFFGDukiOkY)

**Note: Clicking on image below will open a video on YouToBee.**
[](https://www.youtube.com/watch?v=kDPch4SiYjM)
## Output result
1. [Demo - https://alpha.editor.p5js.org/full/H1ZcQ2alG](https://alpha.editor.p5js.org/full/H1ZcQ2alG)
1. [Source Code OnLine - https://alpha.editor.p5js.org/gvitalie/sketches/H1ZcQ2alG](https://alpha.editor.p5js.org/gvitalie/sketches/H1ZcQ2alG)

```javascript
// # sketch.js
function setup() {
createCanvas(windowWidth, windowHeight);
}
function draw() {
background(51);
stroke(120);
strokeWeight(3);
fill(100, 0, 0, 100);
let D = height/2;
translate(width/2 - D/2, height/2);
beginShape();
for(let i=0; i<=D; i++){
let x = i;
let y = D - x;
// point(x, -sqrt(x*y));
// point(x, sqrt(x*y));
vertex(x, -sqrt(x*y));
// vertex(x, sqrt(x*y));
}
endShape();
beginShape();
for(let i=0; i<=D; i++){
let x = i;
let y = D - x;
// point(x, -sqrt(x*y));
// point(x, sqrt(x*y));
// vertex(x, -sqrt(x*y));
vertex(x, sqrt(x*y));
}
endShape();
}
function windowResized(){
resizeCanvas(windowWidth, windowHeight);
}
function mousePressed(){
let fs = fullscreen();
fullscreen(!fs);
}
```
@shiffman :100:
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
The proposal is demonstrated in the linked p5.js demos and the inline sketch.js; start by reviewing those examples and the circle-drawing formula. Done would require a decided project action and a concrete scope for turning the idea into a topic or implementation, neither of which the issue currently specifies.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- computer-graphics
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 20/100