Page 2 of 2
Re: ascjulia.c and ascbrot.c
Posted: 15 Sep 2021, 05:19
by veekoo
This is current state of coding. Pictures added.
Re: ascjulia.c and ascbrot.c
Posted: 16 Sep 2021, 01:16
by lb3361
Using the console directly instead of putchar() avoids the buffering effect and allows you to change colors and x/y positions.
Code: Select all
...
/* Unchanged code above */
if(x+y < 4) { /* Why x+y < 4 btw? */
return i;
}
return 1;
}
#include <gigatron/console.h>
void main(void) {
int x, y, data;
float sx, sy;
for(y = 0; y < HEIGHT; y = y + YSTEP ) {
for(x = 0; x < WIDTH; x = x + XSTEP ) {
sx = SCALE * (WIDTH/2.0 - x) / (WIDTH/2.0);
sy = SCALE * (HEIGHT/2.0 - y) / (HEIGHT/2.0);
data = julia(sx, sy);
console_state.cx = x;
console_state.cy = y;
console_state.fgbg = (((data-48)*6+1) & 0x3f) << 8;
console_print((char*)&data, 1);
}
}
}
giving
- Screenshot from 2021-09-15 21-10-47.png (11.76 KiB) Viewed 5337 times
Re: ascjulia.c and ascbrot.c
Posted: 16 Sep 2021, 06:34
by veekoo
Cool. Very colorful.
A couple of things in code that might be considered. Testing things takes time. Best place is start testing is with ascii-versions, graphics versions take hours to draw the screen.
Re: ascjulia.c and ascbrot.c
Posted: 18 Sep 2021, 08:44
by veekoo
Latest sources and executables can be found at github:
Re: ascjulia.c and ascbrot.c
Posted: 31 Jan 2022, 10:44
by veekoo
Ascii fractal development has gone to solid version (ROMV4). Goal of code is to give full support for standard Gigatron TTL machine with stable rom. I hope many other coders publish some version of their programs for standard machine too.
Re: ascjulia.c and ascbrot.c
Posted: 06 Nov 2023, 07:58
by veekoo
I have gone to ROMv6 era. So here is all in one ascii fractal program.
It has 3 diffrent fractals to choose from: Mandelbrot, Julia and Burning Ship