CodingTrain / CodingTrain/Suggestion-Box
[Quantum Continuum]: Non standard idea to draw a Circle
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 570
- Fork
- 85
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
# 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:
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- computer-graphics
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 20/100