-
Notifications
You must be signed in to change notification settings - Fork 174
bifurc
suborb edited this page May 10, 2017
·
2 revisions
http://en.wikipedia.org/wiki/Bifurcation_diagram#Logistic_map
/* z88dk Maths and graphics demo */
/* Bifurcation diagram of the logistic map */
/* (see http://en.wikipedia.org/wiki/Bifurcation_diagram#Logistic_map) */
#include `<stdio.h>`
#include `<math.h>`
#include `<graphics.h>`
float r,p;
int x,y,b;
int xmax,ymax,bcount;
#define precision 90
#define plot_trigger 60
void main()
{
clg();
xmax=getmaxx();
ymax=getmaxy();
r=2.72;
for (x=0; x<xmax; x++) {
p=r/4.0;
for (b=0; b<precision; b++) {
p=r*p*(1.0-p);
if (plot_trigger < b) {
y=ymax-(int)(p*(float)ymax);
plot (x,y);
}
}
r=r+.005;
}
}
- Overview
- Platform List
- Unsupported Platforms
- i8080/5 Support
- Homebrew hardware quickstart
- Retargetting
- Building the libraries
- Clang support
- Pragmas
- Adding to Classic
- Introduction
- Library Configuration
- CRT
- Header Files
- Assembly Language
- Library in Depth
- Embedded Platform
- Adding to NewLib
- Benchmarks
- Datatypes
- Debugging
- Decompression
- More than 64k
- Deficiencies
- Compiling Larger Applications
- Importing routines written in 8080 assembly mnemonics
- Using CP/M libraries in REL format with z88dk
- Writing optimal code
- Speeding up Compilation
- CMake usage