-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Continuous zoom #175
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #175 +/- ##
==========================================
- Coverage 85.92% 85.91% -0.01%
==========================================
Files 55 55
Lines 10389 10475 +86
==========================================
+ Hits 8927 9000 +73
- Misses 1462 1475 +13
Continue to review full report at Codecov.
|
dc7c070
to
2677560
Compare
2af6b6c
to
5dc4ebb
Compare
a4b76ad
to
867dc6c
Compare
Hi folks! Just wanted to say - thanks a ton for all the work that has gone into this! Sorry I have been scarce the last few months. I've been super busy at work. I have some time off over the holidays so will aim to review, merge and release this as soon as we can. |
That's great news. I'm going to post the last updates in the related issue so you have all the details. |
`Location` (`X`, `Y` ... and `Z`, `W` in 4D space) and `Size` parameters will determine which point of the complex plane correspond to every pixel of the image (we leave out from this explanation the plane rotation parameters). This makes very likely to happen that subsequent frames, where location and size would change slightly, have pixels with the same, or very close point in the complex plane. So it makes sense to, instead of calculate the color of that pixel again (which is the heaviest process) we take the already calculated value. | ||
|
||
The process to find those pixels with same or close complex plane point values, in an efficient way, is based in the assumption that _imaginary values `y` remain constant while moving across X axis, while real values `x` do the same for the Y axis_. And it consist in the following steps: | ||
- find all the `x` values or columns for the new fractal (image) that are close enough to the previous image ones. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One way of thinking about this: imagine you are taking the previous frame and scaling it up. In frame 1, to get the color for pixel (0,0) we calculated point (x,y,z,w). In Frame 2, point (x,y,z,w) is now at a different pixel location, but if that location is still on screen, we can reuse the calculation and color pixel(a,b) with that point. I'm pretty sure that doesn't really depend on only x changing as we move across the screen or y changing vertically. We have a vector (dx,dy,dz,dw) which is the amount the point changes when we step 1 pixel to the left - we can use that to generalize this to work for rotated images or ones in other planes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was exactly my thought when I first read https://github.com/xaos-project/XaoS/wiki/Developer's-Guide#saving-previous-pixels.
Then I said to myself "ok, let's try only XY plane (no plane rotation)". I was surprised when I found out you can actually change plane rotations and it keeps working. Except in certain cases.
As the Gnofract 4D manual states:
It allows you to treat a fractal which has more than one parameter as a four-dimensional object and interactively view slices of this object from arbitrary angles, giving rise to some very unusual images.
It seems that, as long as the slice you are viewing is parallel to one of the axis X or Y, the assumption is valid. In other words, if you rotate the slice respect to X and Y at the same time, then it doesn't work.
I tried to solve this issue/limitation, being playing around with the rotation matrix, point vectors... but honestly I don't have the math background to.
3e25d78
to
6ab7924
Compare
@edyoung is it ok if we merge this PR? |
yes! go for it
…On Wed, Apr 7, 2021 at 8:30 AM Alberto Gonzalez ***@***.***> wrote:
@edyoung <https://github.com/edyoung> is it ok if we merge this PR?
We haven't received any additional feedback so far and it would be a shame
to leave this here forever. Besides, this feature could be enabled/disabled
by configuration.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#175 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAALECRL6A3W2OS6WAVDX5DTHR3ALANCNFSM4RQFNH2A>
.
|
Needs Rebase. |
Restored the previous behaviour to allow make zoom in or out by just clicking the mouse buttons. Added new checkbox in preferences to enable/disable continuous zoom.
…the python wrapper
6ab7924
to
11723bc
Compare
Rebase done! @cjmayo I removed the commented line and refactored the Regarding the flake8 check, I haven't found anything about using flake8 in the project so I'm not sure how to proceed. Are you using it by yourself or is established for developing? |
Hi @edyoung , gnofract4d/fract4d/c/model/site.cpp Lines 24 to 29 in aab8a8f
can you elaborate under what circumstances this may happen? Maybe we're missing something anywhere else |
It's only me. I just mentioned it because the single blank line before the class was obvious, that's fixed after the rebase. |
Please see #80 to better understand what we are trying to do here.