Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
81
votes
Tweetable Mathematical Art
Buddhabrot (+ Antibuddhabrot)
Edit: It's a proper Buddhabrot now!
Edit: I managed to cap the colour intensity within the byte limit, so there are no more falsely black pixels due to overflow.
I rea …
190
votes
Tweetable Mathematical Art
Random painter
char red_fn(int i,int j){
#define r(n)(rand()%n)
static char c[1024][1024];return!c[i][j]?c[i][j]=!r(999)?r(256):red_fn((i+r(2))%1024,(j+r(2))%1024):c[i][j];
}
char green_fn(int …
41
votes
Tweetable Mathematical Art
Edit: This is now a valid answer, thanks to the forward declarations of GR and BL.
Having fun with Hofstadter's Q-sequence! If we're using the radial distance from some point as the input and the out …
122
votes
Tweetable Mathematical Art
Of course, there has to be a Mandelbrot submission.
char red_fn(int i,int j){
float x=0,y=0;int k;for(k=0;k++<256;){float a=x*x-y*y+(i-768.0)/512;y=2*x*y+(j-512.0)/512;x=a;if(x*x+y*y>4)break;}r …
54
votes
Tweetable Mathematical Art
Because unicorns.
I couldn't get the OPs version with unsigned short and colour values up to 1023 working, so until that is fixed, here is a version using char and maximum colour value of 255.
cha …