-
15th April 2025 20:38
Link to Post #61
And rgray222, I love the coffee and dining room tables. That reclaimed wood looks so rich and I especially like the way you balanced the inside planks of the coffee table, the way the grain/grooves curve in opposite directions like a yin yang. Is that the grain of the wood or the sander that did that? Because the results are quite nice. It's the little things and the attention to detail that is so sorely lacking in our big box stores and mass production today. You've got a real talent there. It's old world modern, lol.
Posted by rgray222
(here)
I made this coffee table for my daughter and her husband. They had an odd-length L-shaped sofa so it was an unusual size. The wood is 100-year-old reclaimed lumber from a local barn that was being taken down.
This dining room table seats 6 and, in a pinch, 8. This is also made out of reclaimed local barn wood. I made this table for my daughter and her husband, but they recently moved to Wales, so it has returned home and will be moving to my son and his wife's new home.
16th April 2025 16:56
Link to Post #63
It's a C program! I had to go back and look at my old programming directory to find it, but here's the relevant portion of the code for the Mandelbrot renders.
Code:
#include <stdio.h>
#include <time.h>
#include "mandelbrot.h"
#include "drawing.h"
// FUNCTIONS
BITS mandelbrot(METAIMGPTR img, double complex* c) {
double complex z = (*c);
BITS i = 0;
while ((z == z) && i < img->depth) {
z = (z * z) + (*c);
i++;
}
return i * (z != z);
}
// SCRIPT
void mandelbrot_script(METAIMGPTR img) {
float w, h, x, y, i, propx, propy, halfx, halfy;
float k, ok, limk, propkx, propky;
double x0, x1, y0, y1;
double complex cmplx;
BITS length, distance;
int randmod = 100;
// mode
bool binary_mode = false;
w = img->width;
h = img->height;
// viewport
x0 = -1.75;
x1 = 0.75;
y0 = -1.25;
y1 = 1.25;
y0 = -0.75;
y1 = -0.50;
x0 = -0.675;
x1 = -0.425;
y0 = -0.585;
y1 = -0.535;
x0 = -0.595;
x1 = -0.545;
limk = 8.0;
for (y = 0; y < h; y++) {
propy = y / h;
halfy = 2.0 * fabs(propy - 0.5);
printf("%f\r", propy);
for (x = 0; x < w; x++) {
propx = x / h;
halfx = 2.0 * fabs(propx - 0.5);
i = 0.0;
for (k = 0; k < limk; k++) {
propkx = propx + (float)(rand() % randmod) / (1000.0 * randmod);
propky = propy + (float)(rand() % randmod) / (1000.0 * randmod);
cmplx = (x0 * (1 - propkx) + x1 * propkx) + (y0 * (1 - propky) + y1 * propky) * I;
distance = mandelbrot(img, &cmplx);
k += powf(distance / img->depth, 0.5) * (2.0); // * ((distance == img->depth - 1) ? 0.0 : 1.0);
// printf("%f\t", k);
if (distance == distance) {
i++;
if (binary_mode) {
// printf("fmod(distance, 2.0) = %f\n", fmod(distance, 2.0));
length += (double)fmod(clamp(distance, 0.0, img->depth), 2.0);
} else {
length += distance;
}
}
// printf("%f ", k);
}
// printf("\n");
if (binary_mode) {
// printf("%f ", limk);
length = clamp(length / i, 0, 1);
set_grayscale(length);
} else {
length = clamp(length / i, 0.0, img->depth) / img->depth;
// length = expf(length) - 1.0;
// set_grayscale(powf(3.33 * length, 1.33));
double z = length > 0.01 ? length : 0.0;
// set_hsv_alpha(-15.0 + 360.0 * length, z, z, z * powf(length, 0.15));
set_grayscale(z);
}
draw_pixel(img, y, x);
}
}
printf("\n");
}
Being as I wrote this code 4 years ago, I've lost all intuitive "feel" for the program, which is a huge part of being able to think within the constraints. I am pretty sure I remember taking the render from grayscale, sometimes black and white (modulo), and false coloring it with a gradient in Photoshop, pretty much the same way they do astronomical "photos" (most often collages of sensor readings).
In many ways, my code is my art, which is why I have such an aesthetic sense of it. If it is poetic, functional, and works with an interesting idea -- all the more beautiful!