{"id":621,"date":"2022-08-02T15:16:45","date_gmt":"2022-08-02T15:16:45","guid":{"rendered":"http:\/\/summergeometry.org\/sgi2022\/?p=621"},"modified":"2022-08-02T15:16:45","modified_gmt":"2022-08-02T15:16:45","slug":"neural-julia-sets","status":"publish","type":"post","link":"https:\/\/summergeometry.org\/sgi2022\/neural-julia-sets\/","title":{"rendered":"Neural Julia Sets"},"content":{"rendered":"\n<p class=\"has-text-align-center wp-block-paragraph\"><em>By Caroline Huber, Alan Goldfarb, and Denisse Garnica <\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the first project of SGI, for us, Julia Sets \u2013 where we (in simple terms) attempt to approximate 2D and 3D shapes with a Julia Set \u2013 much interesting work was done. The official problem statement is: Can we train a neural network to predict the corresponding filled Julia set approximation for any given input shape? With daily collaborative meetings and independent coding work we first attempted to understand how to construct these sets with code. We worked our way through several established papers on the subject both independently as well as in several collaborative zooms (see pdfs below).&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"887\" height=\"1024\" data-id=\"624\" src=\"http:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-3.42.10-PM-1-887x1024.png\" alt=\"\" class=\"wp-image-624\" srcset=\"https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-3.42.10-PM-1-887x1024.png 887w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-3.42.10-PM-1-260x300.png 260w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-3.42.10-PM-1-768x887.png 768w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-3.42.10-PM-1-1200x1386.png 1200w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-3.42.10-PM-1.png 1304w\" sizes=\"auto, (max-width: 887px) 100vw, 887px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"874\" height=\"1024\" data-id=\"623\" src=\"http:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-3.42.29-PM-874x1024.png\" alt=\"\" class=\"wp-image-623\" srcset=\"https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-3.42.29-PM-874x1024.png 874w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-3.42.29-PM-256x300.png 256w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-3.42.29-PM-768x900.png 768w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-3.42.29-PM-1200x1406.png 1200w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-3.42.29-PM.png 1282w\" sizes=\"auto, (max-width: 874px) 100vw, 874px\" \/><\/figure>\n<\/figure>\n<\/div><\/div>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Then, we worked on experimenting with some base code that one of our mentors, Richard Liu, provided. By experimenting, we mean that we altered various attributes of the presented function and observed the effects on the fractal output. We changed the values of the roots, their multiplicities, the number of roots, and we added scalar multiples and so on. For reference, Figure 1 is the original fractal. Multiplying by a scalar less than one resulted in less separation between the affected roots (closer together). This is shown in the following figures: multiplying the whole function by a scalar of 0.5 resulted in figure 2 and multiplying just the second and fourth roots by a scalar multiple of 0.5 resulted in figure 3.<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"928\" data-id=\"630\" src=\"http:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Proper-julia-set-example-copy-1024x928.png\" alt=\"\" class=\"wp-image-630\" srcset=\"https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Proper-julia-set-example-copy-1024x928.png 1024w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Proper-julia-set-example-copy-300x272.png 300w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Proper-julia-set-example-copy-768x696.png 768w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Proper-julia-set-example-copy.png 1170w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Figure 1<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"943\" data-id=\"629\" src=\"http:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/figure-2-1-1024x943.png\" alt=\"\" class=\"wp-image-629\" srcset=\"https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/figure-2-1-1024x943.png 1024w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/figure-2-1-300x276.png 300w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/figure-2-1-768x707.png 768w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/figure-2-1.png 1192w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Figure 2<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"977\" data-id=\"628\" src=\"http:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/figure-3-1-1024x977.png\" alt=\"\" class=\"wp-image-628\" srcset=\"https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/figure-3-1-1024x977.png 1024w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/figure-3-1-300x286.png 300w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/figure-3-1-768x733.png 768w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/figure-3-1.png 1188w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Figure 3<\/figcaption><\/figure>\n<\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Conversely, multiplying by a scalar larger than 1 resulted in increased separation between the affected roots (farther apart). The result of multiplying by a scalar of 1.3 resulted in figure 4.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-3 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1008\" data-id=\"633\" src=\"http:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/figure-4-1-1024x1008.png\" alt=\"\" class=\"wp-image-633\" srcset=\"https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/figure-4-1-1024x1008.png 1024w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/figure-4-1-300x295.png 300w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/figure-4-1-768x756.png 768w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/figure-4-1.png 1172w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Figure 4<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"902\" height=\"902\" data-id=\"631\" src=\"http:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-3.50.44-PM.png\" alt=\"\" class=\"wp-image-631\" srcset=\"https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-3.50.44-PM.png 902w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-3.50.44-PM-300x300.png 300w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-3.50.44-PM-150x150.png 150w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-3.50.44-PM-768x768.png 768w\" sizes=\"auto, (max-width: 902px) 100vw, 902px\" \/><figcaption>Figure 5<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"880\" height=\"898\" data-id=\"632\" src=\"http:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-3.50.51-PM.png\" alt=\"\" class=\"wp-image-632\" srcset=\"https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-3.50.51-PM.png 880w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-3.50.51-PM-294x300.png 294w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-3.50.51-PM-768x784.png 768w\" sizes=\"auto, (max-width: 880px) 100vw, 880px\" \/><figcaption>Figure 6<\/figcaption><\/figure>\n<\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Further experimentation included scalar multiple and changing all roots to be double (multiplicity 2), as seen in figure 5, and scalar multiple with only changing the multiplicity of a single root (to be double), as seen in figure 6.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We created a function to add color to the non-Julia Set points. Defining the color with the \u201cescape velocity\u201d. The Julia set -explained in a very ambiguous way- is a set of points that stays in some certain region after many iterations of a function. The \u201cescape velocity\u201d is how long it takes to a point to go outside the region. According to that number we&nbsp; change the color of the point. And we obtain images like this one.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1017\" height=\"1024\" src=\"http:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/7-1017x1024.png\" alt=\"\" class=\"wp-image-634\" srcset=\"https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/7-1017x1024.png 1017w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/7-298x300.png 298w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/7-150x150.png 150w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/7-768x773.png 768w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/7-1200x1208.png 1200w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/7.png 1428w\" sizes=\"auto, (max-width: 1017px) 100vw, 1017px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Here all the black points represent the Julia set. The dark-green points are the ones that have a minor <em>escape velocity <\/em>and the brightest are the ones that took longer to go outside.&nbsp;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We decided that it would be helpful to be able to zoom into these fractals and see what they look like up close (especially with the alterations). So, we added code that zoomed in on a point slightly off-center. Then, we combined several of those images into a gif that runs through them all. (see attachment 1)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"600\" src=\"http:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/fractal-1-copy.gif\" alt=\"\" class=\"wp-image-635\"\/><figcaption>Attachment 1<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">We collaborated to create another gif that runs through frames where the root location is altered, and the picture zooms in on this change. We provided the code to identify and alter the roots and then combined the frames. (see attachment 2 for altered root multiplicities and attachment 3 for a zoom of altered roots).&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-4 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"600\" data-id=\"637\" src=\"http:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/example-4-copy.gif\" alt=\"\" class=\"wp-image-637\"\/><figcaption>Attachment 2<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"600\" data-id=\"636\" src=\"http:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/example-3-copy.gif\" alt=\"\" class=\"wp-image-636\"\/><figcaption>Attachment 3<\/figcaption><\/figure>\n<\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now that Julia sets have been seen in an intuitive way, let&#8217;s see a little more formality. Julia sets of rational maps are determined as follows: Given a rational map (a function of the form f(q)) a complex number q is in the corresponding Julia set if the below limit does not diverge. Here, fn denotes the n<sup>th<\/sup> recursion of f. The constants r1,r2, . . ., rt and s1, s2 , . . .,sb are respectively called the top and bottom roots of f. <\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-5 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-full is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"542\" height=\"140\" data-id=\"640\" src=\"http:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-4.00.37-PM-1.png\" alt=\"\" class=\"wp-image-640\" srcset=\"https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-4.00.37-PM-1.png 542w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-4.00.37-PM-1-300x77.png 300w\" sizes=\"auto, (max-width: 542px) 100vw, 542px\" \/><figcaption>Equation 1<\/figcaption><\/figure>\n<\/figure>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-6 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"250\" height=\"108\" data-id=\"642\" src=\"http:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Screen-Shot-2022-08-01-at-4.04.00-PM-2.png\" alt=\"\" class=\"wp-image-642\"\/><figcaption>Equation 2<\/figcaption><\/figure>\n<\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In order to generate plots of these sets we approximated the set by iterating the function a fixed number of times and comparing the output against a threshold value. Only inputs which produced a value below the threshold were included in the Julia set. We then plotted the <em>filled Julia set<\/em> by plotting the interior of the Julia set.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Some of the filled Julia sets we generated behaved in ways which differed from our initial expectations. According to a paper by Dr. Theodore Kim, points close enough to top roots would be included in the filled Julia set and points close enough to bottom roots would not. Dr. Kim stated that to approximate a given curve with a Julia set one should use a rational function with roots along that curve. However, we realized that symmetric placement of the roots can generate asymmetric Julia sets and that placing roots along the boundary of a shape did not always produce a filled Julia set corresponding to that shape.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In order to get a better understanding of why this might be occurring, we read a few papers describing the mathematical structure of Julia sets of rational functions. We delved deeper into these papers and explained some strange properties about Julia sets. For instance, a Julia set of a polynomial cannot have any mirror symmetries which are not also rotational symmetries. This is the case even if the placement of the roots is symmetric. This led us to the realization that adding roots to a function can have global consequences on the shape of the function\u2019s Julia set which makes the problem of approximating even simple shapes with Julia sets seem more difficult than initially anticipated.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This project has been very interesting for the three of us and we are looking forward to see what we can achieve in the future. We will continue exploring Julia sets, and hopefully we will be able to approximate interesting figures!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Caroline Huber, Alan Goldfarb, and Denisse Garnica In the first project of SGI, for us, Julia Sets \u2013 where we (in simple terms) attempt to approximate 2D and 3D shapes with a Julia Set \u2013 much interesting work was done. The official problem statement is: Can we train a neural network to predict the [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[45],"tags":[118],"class_list":["post-621","post","type-post","status-publish","format-standard","hentry","category-research","tag-julia-sets"],"_links":{"self":[{"href":"https:\/\/summergeometry.org\/sgi2022\/wp-json\/wp\/v2\/posts\/621","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/summergeometry.org\/sgi2022\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/summergeometry.org\/sgi2022\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/summergeometry.org\/sgi2022\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/summergeometry.org\/sgi2022\/wp-json\/wp\/v2\/comments?post=621"}],"version-history":[{"count":4,"href":"https:\/\/summergeometry.org\/sgi2022\/wp-json\/wp\/v2\/posts\/621\/revisions"}],"predecessor-version":[{"id":650,"href":"https:\/\/summergeometry.org\/sgi2022\/wp-json\/wp\/v2\/posts\/621\/revisions\/650"}],"wp:attachment":[{"href":"https:\/\/summergeometry.org\/sgi2022\/wp-json\/wp\/v2\/media?parent=621"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/summergeometry.org\/sgi2022\/wp-json\/wp\/v2\/categories?post=621"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/summergeometry.org\/sgi2022\/wp-json\/wp\/v2\/tags?post=621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}