static double mandelbrotZoomCoordinates_ratio = 16.0/9; static double mandelbrotZoomCoordinates_zoomStep = 1-1e-2; static L<DoubleRect> mandelbrotZoomCoordinates(int steps, double lookAtX, double lookAtY) { int nSteps = 0; new L<DoubleRect> l; for (double w = 1.0; nSteps < steps; w *= mandelbrotZoomCoordinates_zoomStep) { ++nSteps; double h = w/mandelbrotZoomCoordinates_ratio; double x1 = lookAtX-w; double x2 = lookAtX+w; double y1 = lookAtY-h; double y2 = lookAtY+h; //print(nSteps + ": "+ x1 + ", " + y1 + ", " + x2 + ", " + y2); l.add(DoubleRect(x1, y1, x2-x1, y2-y1)); } ret l; }
Began life as a copy of #1014001
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1014002 |
Snippet name: | mandelbrotZoomCoordinates |
Eternal ID of this version: | #1014002/4 |
Text MD5: | a15f964c376345513784686d918d9ad5 |
Author: | stefan |
Category: | javax / web |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-03-19 05:12:02 |
Source code size: | 647 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 373 / 409 |
Version history: | 3 change(s) |
Referenced in: | [show references] |