From da9941939798abe41caa07830a5605f0d131a2f2 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Wed, 1 Jun 2016 13:45:28 +1200 Subject: Coords are now centre of image rather than top left --- algorithms/burning-ship.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'algorithms/burning-ship.c') diff --git a/algorithms/burning-ship.c b/algorithms/burning-ship.c index 7e27e4b..6f8c9d9 100644 --- a/algorithms/burning-ship.c +++ b/algorithms/burning-ship.c @@ -34,17 +34,21 @@ void struct frame *f = &(d->parent_frame); unsigned int x,y,i; double a,b; + double left,top; double complex z,c; defaultsd(&d->parent_frame.scale, 3.5f); - defaultsd(&d->parent_frame.top, -2.2f); - defaultsd(&d->parent_frame.left, -2.2f); + defaultsd(&d->parent_frame.x, -0.45f); + defaultsd(&d->parent_frame.y, -0.45f); + + left = d->parent_frame.x - (d->parent_frame.scale / 2); + top = d->parent_frame.y - (d->parent_frame.scale / 2); /* FIXME document this */ - b = clust_id*(f->scale/size)+f->top; /* FIXME document this */ + b = clust_id*(f->scale/size)+top; /* FIXME document this */ for (y = clust_id; y < size; y += clust_total) { - a = d->core*(f->scale/size)+f->left; + a = d->core*(f->scale/size)+left; for (x = d->core; x < size; x += cores) { z = 0; c = a+I*b; -- cgit v1.1