Fibonacci output
How do I make an fibonacci output?
What is a fibonacci output? How do you make a fibonacci output? This script and codes were developed by Wenting Zhang on 07 November 2022, Monday.
Fibonacci output - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>fibonacci output</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <canvas id="myCanvas" width="1440" height="768"></canvas> <script src='https://cdnjs.cloudflare.com/ajax/libs/three.js/r77/three.min.js'></script>
<script src='http://davidbau.com/encode/seedrandom.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Fibonacci output - Script Codes CSS Codes
body { margin: 0px; padding: 0px;
}
#myCanvas { background-color: #fff;
}
Fibonacci output - Script Codes JS Codes
var canvas = document.getElementById('myCanvas');
var context = canvas.getContext('2d');
// i%2
var i = 0;
Math.seedrandom(5);
function fibonacci(a,b){ var result; // do somme math result = a + b; console.log(result); // context.rect(?,?,result,result); var tempColor = new THREE.Color().setHSL(Math.random(), Math.random(), 0.7).getStyle(); context.fillStyle = tempColor; // context.stroke(); if (i%2){ // odd number, when i is 1, 3, 5 context.fillRect(0,b,result,result); } else { // even number, when i is 2, 4, 6 context.fillRect(b,0,result,result); } i++; if ( result < 800) { fibonacci(b, result); }
}
fibonacci(1,1);
// a + b
// 1, 1,
// 1 + 2 = 3
// 2 + 3 = 5
// 3 + 5 = 8
// 5 + 8 = 13
// 8 + 13 = 21;
Developer | Wenting Zhang |
Username | wentin |
Uploaded | November 07, 2022 |
Rating | 3.5 |
Size | 2,014 Kb |
Views | 14,168 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
100 days of research | 7,754 Kb |
Algorithmic Animation javascript template | 1,865 Kb |
SVG Animation | 30,040 Kb |
ResponsifyJS demo | 5,586 Kb |
Water ripple effect. | 2,746 Kb |
Three.js start point | 1,866 Kb |
P5.js Tail | 1,745 Kb |
A Pen by Wenting Zhang | 1,570 Kb |
Pure css solution to responsive background image | 1,499 Kb |
Shaking mustache | 1,708 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Image Hover | Johnheiner | 3,409 Kb |
Twitch TV | Natester13 | 4,488 Kb |
Toggle menu | Seyedi | 2,279 Kb |
Coming Soon | MariamMassadeh | 1,680 Kb |
Video Player Custom Controls | EleftheriaBatsou | 3,665 Kb |
A Pen by Kenny Mark | Kennymark | 5,574 Kb |
Whyutils | LeYvan | 3,752 Kb |
SVG Basics | HipsterBrown | 1,852 Kb |
Add This API | ThatGuySam | 2,848 Kb |
Wikipedia viewer | Chpecson | 2,865 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!