The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!
|
|
A discrete fractal for a change | ||||||
Previous Image | Next Image | ||||||
Description: Tired of the same old ray marched fractals that look like pudding from HELL? This is the submission for you! Every pixel is either white or black. This is what the algorithm is, for each pixel's integer coordinates (in binary): 0 - y -> a a & x -> a a - x -> a bitwise_population(a) -> a if(a is odd){the pixel is black} How does this generate patterns that look like Koch snowflakes? I don't know! Stats: Total Favorities: 0 View Who Favorited Filesize: 47.17kB Height: 1093 Width: 1024 Discussion Topic: View Topic Keywords: discrete bitwise hack Posted by: 0xbeefc0ffee June 10, 2017, 03:10:20 AM Rating: Has not been rated yet. Image Linking Codes
|
||||||
0 Members and 1 Guest are viewing this picture. | ||||||
Related Images | ||||||
|
|
Comments (2) | |
0xbeefc0ffee | July 01, 2017, 05:51:48 PM Oh yeah the plus one comes in because a signed negation is different from a bitwise negation. The difference between them causes +1 to be added. |
0xbeefc0ffee | June 21, 2017, 08:24:31 PM I found that this algorithm can be simplified to this: pop(~(x&y)+1) Note that the size of x and y actually matters because it effects the population. I used 64 bits. (signed long long) algorithms like are interesting because they are fast to compute. In a ray tracer, people don't like to do real textures because they are hard. With this, you could cast floating point hit coordinates of an object to integers in order to get interesting looking features with low effort and speed decrease. |
Powered by SMF Gallery Pro