Skip to content

GSoC 2020

Anurag Aggarwal edited this page Aug 26, 2020 · 10 revisions

Google Summmer of Code 2020

GSoC 2020 Final Report

Along with the great mentorship of @kovzol - Zoltán Kovács, I added multiple functionalities to XaoS and fixed some existing crashes. The project went beyond the proposed changes and we successfully released two new subversion of XaoS during this time.

Release 4.1 and 4.2 list these changes as:

Finished Work

New Features

  • Palette editor, save/load palettes, storing user palettes in the .xpf file. PR #194 #195 #196

  • The option 'User formulas' maintains a history of recently used formulas. PR #202

  • Fractal info in the Help menu. PR #198

  • Batch rendering. PR #184

  • Enabled panning in rotate mode. PR #189

  • Unified Open and Open Image option. Save Image option moved to Save as. PR #191

  • Added option to show Cartesian coordinate grid. PR #171

  • Custom palette helps visualizing palette before applying changes through slider selectable values now. PR #168

  • PNGs exported using 'Save Image' option can be imported back and users can continue zooming on it. PR #166 #180

Bug Fixes

  • Fixed crash on recording XaoS animations. PR #156

  • Fixed crash on rendering using command line. - PR #159

  • Only error messages are shown on incorrect commands - PR #160

  • & other small bug fixes (Memory Leaks, Segmentation Faults).

Changes in XaoSJs

  1. One Screen View for XaoSJs - see commit

  2. Touch Zoom Support for XaoSJs - see commit

Unfinished Work

Some parts of the project didn't see completion because of complication but good attempts were made.

Note: Support for arbitrary precision was a part of my GSoC proposal. Other issues were picked out of curiosity and enthusiasm for XaoS ;-)

1. Support for arbitrary precision:

  • XaoS doesn't support very deep zooms because of 80 bit floating point arithmetic. Use of MPFR Library with Perturbation theory was to be investigated in implementing arbitrary precision for very deep zooms. Further decisions were to be taken by bench-marking different method and using the fastest one. XaoS globally uses a number_t variable for switching between float128 and LONG DOUBLE data type. Unfortunately there is no easy way to do switch betwen these data types at runtime. Thus in the LONG_DOUBLE compiled version we are restriced to 10^16 zoom and 10^32 for float128 compiled version. float128 version is naturally slower so we can't keep the real time zooming capabilities by making it default for early zoom levels. After 10^32 we need to support much greater zooms but clearly use of arbitrary precision would be even slower. Thus we should be able to dynamically switch between LONG_DOUBLE (upto 10^16), float128 (upto 10^32) and use arbitrary precision beyond that.

  • Attempts made:

    1. Templatizing XaoS: @kovzol gave the clever idea to convert number_t from a macro definition to a struct. This struct can maintain two or more types of data structure and we can use a global variable to switch between them. However this was slow. More information at issue #24 comment, repository that implements this - https://github.com/kanurag94/XaoS/tree/templatize-xaos

    2. Converting fractal_context to a class, and templatizing the data type: @jblang suggested that we should convert fractal_context to a class and the functions operating on fractal_context should be made member function. Then we can initiate objects of different data types from outermost function and use a wrapper function to decide which instance gets called. However we have over ~600 instances of fractal_context objects. I couldn't find a way to wrap them easily in a function. More information on issue #24 comment, repository that implements this - https://github.com/kanurag94/XaoS/tree/float128

2. XaoS web Compilation

  • Qt for web assembly can compile a web version of XaoS. Currently the infinite loop inside XaoS leads to crash when web compiled version of XaoS is launched.

  • Attempts made:

    1. @kovzol and I have started working on web compilation.

3. Switch Language Dynamically

  • XaoS needs a restart everytime language has to be changed.

  • Attempts made:

    1. Dynamically switching languages is currently out of scope without redoing menus with Qt quick. However this is not possible on Ubuntu 18.04 which has LTS upto 2023. This means we might break something while making this work. So take a break :D.

4. Fix bestprice assertion failure during rendering large files.

  • XaoS produces bestprice assertion failed error while rendering large files.

  • Attempts made:

    1. Fix Overflow: @trathborne and I suspected overflow of currently used int data type for bestprice. I tried to convert many int involved in calculation to long in hope overflow doesn't occur. But writing software is not easy :-(

Acknowledgement

I'm grateful to my mentor Zoltán Kovács for his guidance. His sound knowledge has been a constant source of motivation for me. I would also like to thank GNU Community for the project. Google Summer of Code has been a very insightful experience for me and I'm taking away much from it. I'm motivated to keep contributing to the project.

Clone this wiki locally