0% found this document useful (0 votes)
5 views2 pages

Drawing Mathematical Numbers and Applications

The document contains a Processing code that generates multiple layers of Fibonacci ellipses, using a loop to create varying rotations and sizes based on Fibonacci numbers. It sets colors for each layer and uses transformations to position the ellipses correctly. Additionally, there is a closing note indicating that users will create their own designs based on mathematical applications.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Drawing Mathematical Numbers and Applications

The document contains a Processing code that generates multiple layers of Fibonacci ellipses, using a loop to create varying rotations and sizes based on Fibonacci numbers. It sets colors for each layer and uses transformations to position the ellipses correctly. Additionally, there is a closing note indicating that users will create their own designs based on mathematical applications.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

void setup() {

size(500, 500);

background(255);

void draw() {

translate(width / 2, height / 2);

float a = 0;

float b = 1;

// Loop to create multiple layers of Fibonacci ellipses

for (int layer = 0; layer < 5; layer++) { // Change the number of layers
as needed

float angleOffset = layer * (PI / 10); // Different rotation for each layer

float tempA = a;

float tempB = b;

for (int i = 0; i < 15; i++) {

float temp = tempA;

tempA = tempB;

tempB = temp + tempB;

// Use Fibonacci number for position

float x = tempA * 5; // Scale down for better visibility

float y = 0;

// Use Fibonacci number for size


float size = tempA * 2; // Scale size for better visibility

// Set color based on layer

fill((layer * 50) % 255, (i * 20) % 255, (layer * 30 + i * 10) % 255);

noStroke(); // No outline for the ellipses

// Apply rotation with angle offset

pushMatrix(); // Save the current transformation matrix

rotate(angleOffset + (PI / 5) * i); // Rotate based on layer and index

ellipse(x, y, size, size);

popMatrix(); // Restore the previous transformation matrix

Closing (40 minutes)


You will create your own designs based on applications of mathematical numbers.

You might also like