{"id":2144,"date":"2025-04-11T04:05:19","date_gmt":"2025-04-11T04:05:19","guid":{"rendered":"https:\/\/summergeometry.org\/sgi2024\/?p=2144"},"modified":"2025-04-11T04:05:21","modified_gmt":"2025-04-11T04:05:21","slug":"neural-shape-sweeping-with-signed-distance-functions","status":"publish","type":"post","link":"https:\/\/summergeometry.org\/sgi2024\/neural-shape-sweeping-with-signed-distance-functions\/","title":{"rendered":"Neural shape sweeping  with signed distance functions"},"content":{"rendered":"\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"344\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-22-at-11.25.16\u202fAM-1024x344.png\" alt=\"\" class=\"wp-image-2153\" style=\"width:512px;height:auto\" srcset=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-22-at-11.25.16\u202fAM-1024x344.png 1024w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-22-at-11.25.16\u202fAM-300x101.png 300w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-22-at-11.25.16\u202fAM-768x258.png 768w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-22-at-11.25.16\u202fAM-1536x517.png 1536w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-22-at-11.25.16\u202fAM-1200x404.png 1200w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-22-at-11.25.16\u202fAM.png 1546w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Figure 1: Our example 3D implementations of Gpytoolbox sweeping of Stanford bunny and Spot cow object across zig-zag trajectory  <\/figcaption><\/figure>\n<\/div><\/div>\n<\/div>\n\n\n\n<p class=\"has-secondary-color has-text-color has-link-color has-small-font-size wp-elements-8c11db1ad002c33135355cb1143b390f\"><\/p>\n\n\n\n<p class=\"has-text-align-left has-small-font-size\"><strong>By Juan Parra, Kimberly Herrera, and Eleanor Wiesler <\/strong><\/p>\n\n\n\n<p class=\"has-small-font-size\">Project mentors: <strong>Silvia Sell\u00e1n, Noam Aigerman<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>Given a surface we can represent it moving along certain trajectory in space by a swept area or swept volume. It&#8217;s a good idea to take this approach to model 3D shapes or to detect a collision of the shape with another shape in its environment. There are several algorithms in the literature that address the construction of the surface of a swept volume in space, each taking their respective assumptions on the surface and the trajectory.<\/p>\n\n\n\n<p>In our project we trained neural networks to predict the sweeping of a surface, and attempted to find the best representation of a neural network that deals with discontinuities that appear in the process.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Using Signed-Distance Functions to Model Shape Sweeping<\/strong><\/h2>\n\n\n\n<p>By a swept volume we mean the trajectory that a solid moving through space made. The importance of representing a swept volume can go from art modeling to collision detection in robotics. We can model the swept volume of the solid motion as a surface in 3D. The goal of this project is to train neural networks to learn swept volumes, and so we conducted the experiments of this study using 2D shapes swept across a trajectory in the coordinate plane and evaluated resulting swept area. To study the trajectory or &#8220;sweeping&#8221; of these shapes, we used Signed Distance Functions (SDFs).<\/p>\n\n\n\n<div style=\"margin: 0 auto\">\nA signed distance function is a way to represent a closed orientable surface S in 3D (or a closed curve in 2D). This signed distance function (SDF) is given by a function:    \n\\( D:\\mathbb{R}^3\\to\\mathbb{R} \\) such that \\( |D(p)| = \\min\\{d(p,q)^2: q\\in S\\} \\), and the sign of \\( D(p) \\) is negative if \\( p \\) is inside the surface and positive otherwise. The zero level set \\( D^{-1}(0) \\) is equal to the surface \\( S \\).\n\n    Given a signed distance function, we can use the Marching Cubes algorithm to construct a mesh representation of the surface. For example, \\( G(x,y)=x^2 + y^2 -1 \\) is the SDF of the unit circle.\n\n    <div style=\"text-align: center\">\n        <img decoding=\"async\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/single_circle.png\" alt=\"Single circle\" style=\"width: 50%;height: auto;text-align: center;margin: 0 auto\">\n        <p>Figure 1: SDF of a single circle<\/p>\n    <\/div>\n\n    How to represent the SDF of the swept volume of a solid moving through space? We can leverage the operations between SDF&#8217;s to construct more complicated surfaces. For instance, the SDF of a unit circle is given by the function \\( G(x,y) = x^2 + y^2 &#8211; 1 \\) and the SDF of a translated circle to the right is \\( H(x,y) = (x-0.75)^2 + y^2 &#8211; 1 \\).\n\n    So if we wanted to paste both circles as if they were bubbles, we could define the union SDF as:\n    \\[\n        \\mathrm{union}(x,y)\n        =\n        \\min\\{\n            G(x,y), H(x,y)\n        \\}\n    \\]\n\n    <div style=\"text-align: center\">\n        <img decoding=\"async\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/union_circles.png\" alt=\"SDF of a union of circles\" style=\"width: 50%;height: auto;margin: 0 auto\">\n        <p>Figure 2: SDF of a union of circles<\/p>\n    <\/div>\n<\/div>\n\n\n\n<div style=\"margin: 0 auto\">\n\nIf we want to perform a continuous motion of the solid we have to model it with a continuous function \\(T: [0,1] \\to SO(3)\\) parametrized by the time, where \n\\(SO(3)\\) is the set of rigid motions in 3D (abuse of notation to consider translations as well). Analogously we can think of rigid motions in 2D.\nSuppose that \\(F:\\mathbb{R}^3 \\to \\mathbb{R}\\) is the SDF of the solid we&#8217;re moving through space with the motion \n\\(T:[0,1] \\to SO(3)\\).\nThen the swept volume of the solid is given by the SDF\n$$\n    \\text{swept volume}(\\mathbf{x})\n    =\n    \\min_{t\\in[0,1]}\n    F(T_t^{-1}(\\mathbf{x})).\n$$\n\nFor the construction of a swept volume (or area) we can start with a previous \nstep, which is to define the function \\(t^*:\\mathbb{R}^3 \\to \\mathbb{R}\\)\n$$\n    t^*(\\mathbf{x})\n    =\n    \\mathrm{argmin}_{t\\in [0,1]}\n        F(T_t^{-1}(\\mathbf{x})),\n$$\nfor which we will also have\n$$\n    \\text{swept volume}(\\mathbf{x})\n    =\n    F\n    \\left(\n        T_{t^*(\\mathbf{x})}^{-1}\n        (\\mathbf{x})\n    \\right).\n$$\n\n\nThe \\(t^*\\) function now it&#8217;s a &#8220;piecewise&#8221; continuous function on its domain\nas shown in the following figures.\n<\/div>\n\n\n\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=\"542\" height=\"407\" data-id=\"2636\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/smooth-swept-sine-circle-edited-1.png\" alt=\"\" class=\"wp-image-2636\" srcset=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/smooth-swept-sine-circle-edited-1.png 542w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/smooth-swept-sine-circle-edited-1-300x225.png 300w\" sizes=\"auto, (max-width: 542px) 100vw, 542px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"542\" height=\"407\" data-id=\"2635\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/t_star_circle_sine-edited-1.png\" alt=\"\" class=\"wp-image-2635\" srcset=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/t_star_circle_sine-edited-1.png 542w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/t_star_circle_sine-edited-1-300x225.png 300w\" sizes=\"auto, (max-width: 542px) 100vw, 542px\" \/><\/figure>\n<\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Finite Stamping<\/h3>\n\n\n\n<div style=\"margin: 0 auto\">\n\nIn order to compute an approximation for the swept volume, one first approach will be to make finite stamping of the SDF moving along a finite discretized sequence of times \n\\(0= t_1&lt; \\cdots&lt; t_n=1\\) and then compute the SDF \n$$\n    \\text{swept volume approximation}(\\mathbf{x})\n    =\n    \\min_{t\\in \\{t_1, \\ldots, t_n\\}}\n    F(T_t^{-1}(\\mathbf{x})).\n$$\nFor example, if we define an SDF of a bone (see next 3 images),\nand let&#039;s say we defined the motion \\(T_t(x,y) = (x,y) + (t, \\sin(t))\\), then depending on how fine is our discretization, we can have a good or a bad approximation.\n\n<\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"480\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/expected_sdf_bone.png\" alt=\"\" class=\"wp-image-2643\" style=\"width:400px\" srcset=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/expected_sdf_bone.png 640w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/expected_sdf_bone-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n<\/div>\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-2 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=\"640\" height=\"480\" data-id=\"2644\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/f-s-bone-20.png\" alt=\"\" class=\"wp-image-2644\" srcset=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/f-s-bone-20.png 640w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/f-s-bone-20-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"480\" data-id=\"2645\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/f-s-bone-200.png\" alt=\"\" class=\"wp-image-2645\" srcset=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/f-s-bone-200.png 640w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/f-s-bone-200-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n<\/figure>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"has-text-align-center\">(a) 20 times<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"has-text-align-center\">(b) 100 times<\/p>\n<\/div>\n<\/div>\n\n\n\n<div style=\"margin: 0 auto\">\n\nIn this case we can also define an approximation to the \\(t^*\\) function as \nfollows\n$$\n    t^*_{\\text{approx}}(\\textbf{x})\n    =\n    \\text{argmin}_{t \\in \\{ t_1, \\ldots, t_n \\}}\n    F(T_{t}^{-1} (\\mathbf{x})).\n$$\n\nHowever, we can notice that looking for the argument of the minimum \nof a function can be computationally expensive, and that&#8217;s something we may want to do only once in our lifes.\nMaybe we could substitute our Finite Stamping SDF with a neural network.\nKnowing that \\(t^*\\) is not a continuous function, it will be interesting to fit a neural network to it, and play with its architecture so we find a neural network that represents better those discontinuities.\n\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Learning Swept SDFs with Neural Networks<\/h2>\n\n\n\n<h3>How to use a NN for SDFs<\/h3>\n<p>A neural network is just a function with many parameters; we can tweak these parameters to best approximate an SDF. To train the network, we first sample random points from the circle and compute their actual SDF values. The network&#8217;s goal is to predict these SDF values. By comparing the predicted values to the actual values using a loss function, the network can adjust its parameters to reduce the error. This adjustment is typically done through gradient descent, which iteratively refines the network\u2019s parameters to minimize the loss. After training, we visualize the results to assess how well the neural network has learned to approximate the SDF. In the image below, the green represents the prediction for the circle by the neural network.<\/p>\n\n\n\n<figure class=\"wp-block-gallery aligncenter has-nested-images columns-2 is-cropped wp-block-gallery-3 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"537\" height=\"418\" data-id=\"2230\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/circle_sdf.png\" alt=\"\" class=\"wp-image-2230\" srcset=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/circle_sdf.png 537w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/circle_sdf-300x234.png 300w\" sizes=\"auto, (max-width: 537px) 100vw, 537px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"539\" height=\"403\" data-id=\"2234\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/learned_circle_sdf.png\" alt=\"\" class=\"wp-image-2234\" srcset=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/learned_circle_sdf.png 539w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/learned_circle_sdf-300x224.png 300w\" sizes=\"auto, (max-width: 539px) 100vw, 539px\" \/><\/figure>\n<\/figure>\n\n\n\n<p>For computing a swept area, the neural network needs to approximate the union of multiple SDFs that together represent the swept area. Computing the swept area involves shifting the SDF along the trajectory at various points in time and then taking the union of all these SDFs. Once we understood how to compute the swept area ourselves, we had the neural network attempt the same. The following images show the results of our manual computation, which we refer to as the naive algorithm, for the sweeping of the circle along a horizontal path in comparison to the computation produced by the neural network. Similarly, the green represents the prediction for the swept area by the neural network.<\/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=\"508\" height=\"389\" data-id=\"2240\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/naive_circle_sweep_horizontal.png\" alt=\"\" class=\"wp-image-2240\" srcset=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/naive_circle_sweep_horizontal.png 508w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/naive_circle_sweep_horizontal-300x230.png 300w\" sizes=\"auto, (max-width: 508px) 100vw, 508px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"542\" height=\"409\" data-id=\"2238\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/learned_sweeping_circle_horizontal.png\" alt=\"\" class=\"wp-image-2238\" srcset=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/learned_sweeping_circle_horizontal.png 542w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/learned_sweeping_circle_horizontal-300x226.png 300w\" sizes=\"auto, (max-width: 542px) 100vw, 542px\" \/><\/figure>\n<\/figure>\n\n\n\n<p>So far, we\u2019ve trained the neural network to compute the SDF values for each point in a 2D grid. Now, since we are sweeping a shape over time, we want the network to return the times corresponding to these SDF values. We call these times <i>t*<\/i>. With the same shape and trajectory as above, the network has little issue doing this.<\/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-large\"><img loading=\"lazy\" decoding=\"async\" width=\"517\" height=\"403\" data-id=\"2242\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/naive_circle_t_star_horizontal.png\" alt=\"\" class=\"wp-image-2242\" srcset=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/naive_circle_t_star_horizontal.png 517w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/naive_circle_t_star_horizontal-300x234.png 300w\" sizes=\"auto, (max-width: 517px) 100vw, 517px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"517\" height=\"409\" data-id=\"2236\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/learned_circle_t_star_horizontal.png\" alt=\"\" class=\"wp-image-2236\" srcset=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/learned_circle_t_star_horizontal.png 517w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/learned_circle_t_star_horizontal-300x237.png 300w\" sizes=\"auto, (max-width: 517px) 100vw, 517px\" \/><\/figure>\n<\/figure>\n\n\n\n<p>We also made sure that the <i>t*<\/i>&#8216;s that we computed were producing the correct SDF of the swept area.<\/p>\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=\"542\" height=\"403\" data-id=\"2233\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/horizontal_circle_verification.png\" alt=\"\" class=\"wp-image-2233\" srcset=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/horizontal_circle_verification.png 542w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/horizontal_circle_verification-300x223.png 300w\" sizes=\"auto, (max-width: 542px) 100vw, 542px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"551\" height=\"403\" data-id=\"2232\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/horizontal_circle_mse.png\" alt=\"\" class=\"wp-image-2232\" srcset=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/horizontal_circle_mse.png 551w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/horizontal_circle_mse-300x219.png 300w\" sizes=\"auto, (max-width: 551px) 100vw, 551px\" \/><\/figure>\n<\/figure>\n\n\n\n<h2>NN Difficulties detecting discontinuities<\/h2>\n<p>Using a more complex trajectory, such as a sine wave, introduces some challenges. While the neural network performs well in predicting the <i>t*<\/i> values, issues arise when computing the SDF with respect to these times. Specifically, the resulting SDF shows three lines emerging from the peaks and troughs of the curve. We can see this even more through the MSE plot.<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-7 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"517\" height=\"403\" data-id=\"2239\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/naive_-circle_t_star_sine.png\" alt=\"\" class=\"wp-image-2239\" srcset=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/naive_-circle_t_star_sine.png 517w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/naive_-circle_t_star_sine-300x234.png 300w\" sizes=\"auto, (max-width: 517px) 100vw, 517px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"517\" height=\"409\" data-id=\"2237\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/learned_circle_t_star_sine.png\" alt=\"\" class=\"wp-image-2237\" srcset=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/learned_circle_t_star_sine.png 517w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/learned_circle_t_star_sine-300x237.png 300w\" sizes=\"auto, (max-width: 517px) 100vw, 517px\" \/><\/figure>\n<\/figure>\n\n\n\n<p> The left image shows the sweeping of the circle using the <i>t*<\/i> values computed by the neural network.\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-8 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"508\" height=\"389\" data-id=\"2241\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/naive_circle_sweep_sine.png\" alt=\"\" class=\"wp-image-2241\" srcset=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/naive_circle_sweep_sine.png 508w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/naive_circle_sweep_sine-300x230.png 300w\" sizes=\"auto, (max-width: 508px) 100vw, 508px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"508\" height=\"389\" data-id=\"2235\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/learned_circle_sweep_sine.png\" alt=\"\" class=\"wp-image-2235\" srcset=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/learned_circle_sweep_sine.png 508w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/learned_circle_sweep_sine-300x230.png 300w\" sizes=\"auto, (max-width: 508px) 100vw, 508px\" \/><\/figure>\n<\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"533\" height=\"389\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/sine_circle_mse.png\" alt=\"\" class=\"wp-image-2243\" style=\"width:506px;height:auto\" srcset=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/sine_circle_mse.png 533w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/sine_circle_mse-300x219.png 300w\" sizes=\"auto, (max-width: 533px) 100vw, 533px\" \/><\/figure>\n\n\n\n<p> These challenges become even more apparent when using shapes with sharper\nedges such as a square. Because of this, we decided to work on optimizing the\nneural network architecture. \n\n<h2>Adjusting Our Neural Network Architecture<\/h2>\n\n<h3>Changing Our Activation Function<\/h3>\n\n<p>Every neural network has a defined activation function. In the case of our preliminary neural network experiments above, the specified activation function was a Rectified Linear Unit (ReLU). Despite this, we did not achieve the most desirable outcome of minimal error in the predicted swept SDF versus the naive algorithm swept SDF. Specifically, we observed errors at sites of discontinuity, where there were changes in sign, for example.<\/p>\n\n<p>In an attempt to improve neural network performance, we decided to experiment with different activation functions by altering our neural network architecture. Below, we present their corresponding results when used for swept SDF prediction. <\/p>\n\n\n\n<p><strong>ReLU<\/strong> <strong>Function (Rectified Linear Unit Function)<\/strong><\/p>\n\n\n\n<div style=\"text-align: center\">\nf(x) = \n<math>\n  <mrow>\n    <mo>{<\/mo>\n    <mtable>\n      <mtr>\n        <mtd>0<\/mtd>\n        <mtd>\n          <mtext>for<\/mtext>\n          <mo>&nbsp;x &lt; 0<\/mo>\n        <\/mtd>\n      <\/mtr>\n      <mtr>\n        <mtd>x<\/mtd>\n        <mtd>\n          <mtext>for<\/mtext>\n          <mo>&nbsp;x &ge; 0<\/mo>\n        <\/mtd>\n      <\/mtr>\n    <\/mtable>\n  <\/mrow>\n<\/math>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/slidesz\/AGV_vUdJxDo4-gC1SRttB0RYfU-tWKq4kxboiTNFpAnkOMPomYDo-slmO9IkySiTRFwil3QVqjucdegFDz_HGf0-f8u6Q28-mEte2Vibn9Asntya-1xMHGLQghfD5fnh0ZPCNM32Ghbe6HkwkivR-yJX2x7fm7lanAzb=s2048?key=q1uc5Zl4E2bmYxn5E813ew\" style=\"width: 500px\"><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><img decoding=\"async\" width=\"405px;\" height=\"309px;\" src=\"https:\/\/lh7-rt.googleusercontent.com\/slidesz\/AGV_vUfE7C7OkkJCggQN7KEsDG1oqaFHY8LxhVtra06nbbBo3PAHbdMM1RmrrFBOU0BZZvlz3_RCS0CTTPDvTiIJoU2tXZMmxxzBvOWftNh68XjuNNeRQYi3_EK-d-iMlJIU8kXtGsMUv2ogX-7360Xtow7RzPYAX04=s2048?key=q1uc5Zl4E2bmYxn5E813ew\"><\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><img decoding=\"async\" width=\"433px;\" height=\"331px;\" src=\"https:\/\/lh7-rt.googleusercontent.com\/slidesz\/AGV_vUftB4_j3xjKfb4cGTpDvUK1HiQeV7brm-NNVo1tUgDFM9RKP-H3r-LgMHnjh6XgEQRV0mUn3DCyqcAf3qidNwkjXynzV2txeID1DwV6O-6SxmcglGJ-cf8q6q5f3ZUj_6MEN99I9Rlym_tZBcWdcU57hIbLMOGs=s2048?key=q1uc5Zl4E2bmYxn5E813ew\"><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><img decoding=\"async\" width=\"420px;\" height=\"321px;\" src=\"https:\/\/lh7-rt.googleusercontent.com\/slidesz\/AGV_vUcj-GAg142uphjIwF5a-tSt76MKjlI0qQVLOISDRESdoNKCmgKQZ7aExKOKvudw-vmIhj2l_KFK5H23FKL2Cmmi4s1tB_7ECVshfpSXd7zPoD5A2vCdyG6y7ckP5XdspTfyosn9kDAf7OgEq8H1bbHKvnNxnTij=s2048?key=q1uc5Zl4E2bmYxn5E813ew\"><\/p>\n<\/div>\n<\/div>\n\n\n\n<p class=\"has-text-align-center\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/slidesz\/AGV_vUd_O2yLex6f-aYbY88QWI-C0UtR5Tv6Low0bbQlv2ib1_UVhB4kSujbwcZP6zA_Thv3ebeF9U_K0ztnlvP4eoQLP2fPj1g2Iff2Jl3brhsE-dN6OCkwrbxWoXygHpHuTYEA_kFV1zNkLsud48xMXShCx8ir3g=s2048?key=q1uc5Zl4E2bmYxn5E813ew\" style=\"width: 400px\"><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Logistic Sigmoid Function <\/strong><\/p>\n\n\n\n<div style=\"text-align: center\">\nf(x) = <math xmlns=\"http:\/\/www.w3.org\/1998\/Math\/MathML\">\n  <mfrac>\n    <mn>1<\/mn>\n    <mrow>\n      <mn>1<\/mn>\n      <mo>+<\/mo>\n      <msup>\n        <mi>e<\/mi>\n        <mrow>\n          <mo>&#8211;<\/mo>\n          <mi>x<\/mi>\n        <\/mrow>\n      <\/msup>\n    <\/mrow>\n  <\/mfrac>\n<\/math>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><img decoding=\"async\" width=\"411px;\" height=\"321px;\" src=\"https:\/\/lh7-rt.googleusercontent.com\/slidesz\/AGV_vUdJxDo4-gC1SRttB0RYfU-tWKq4kxboiTNFpAnkOMPomYDo-slmO9IkySiTRFwil3QVqjucdegFDz_HGf0-f8u6Q28-mEte2Vibn9Asntya-1xMHGLQghfD5fnh0ZPCNM32Ghbe6HkwkivR-yJX2x7fm7lanAzb=s2048?key=q1uc5Zl4E2bmYxn5E813ew\"><\/p>\n\n\n\n<p><img decoding=\"async\" width=\"433px;\" height=\"331px;\" src=\"https:\/\/lh7-rt.googleusercontent.com\/slidesz\/AGV_vUftB4_j3xjKfb4cGTpDvUK1HiQeV7brm-NNVo1tUgDFM9RKP-H3r-LgMHnjh6XgEQRV0mUn3DCyqcAf3qidNwkjXynzV2txeID1DwV6O-6SxmcglGJ-cf8q6q5f3ZUj_6MEN99I9Rlym_tZBcWdcU57hIbLMOGs=s2048?key=q1uc5Zl4E2bmYxn5E813ew\"><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><img decoding=\"async\" width=\"477px;\" height=\"362px;\" src=\"https:\/\/lh7-rt.googleusercontent.com\/slidesz\/AGV_vUd3IN3TSM-jTYUwZvteSgIffZQhufjjDM2of_nw42W1rYAiAH7hOFEVqz3eIw3zgh6Rt3EUKpQJoF8_QYeuwjv5XAnP_y9M2E3dp27_Nl2YLqnXhtb2B89-j79DsUGCXbWTxoLSOxZjGvKMfDdUR36O3scViChl=s2048?key=q1uc5Zl4E2bmYxn5E813ew\"><\/p>\n\n\n\n<p><img decoding=\"async\" width=\"468px;\" height=\"358px;\" src=\"https:\/\/lh7-rt.googleusercontent.com\/slidesz\/AGV_vUd8qZ_6q982vxz8ZF4LqnPSEtaejEgehiyIqmIsB9ZdluRCfG7izZOyeKxQ7sntU3PJF6WcawV5XSX8g9VV0NXus2_bqdzjGIpjcLxmSGGIrr9SXKa_D3osuuqgdMPoKJZj3ZjEIRt4RbeG9ooDn06xdpPHZflE=s2048?key=q1uc5Zl4E2bmYxn5E813ew\"><\/p>\n<\/div>\n<\/div>\n\n\n\n<p class=\"has-text-align-center\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/slidesz\/AGV_vUeRNeoomUB9G44_XRLskgbFVHQIqMhqbdCK63NQSVpXmAtRE13dtcuudCjOUYiPWkaCoRHjPLfwQmA42X0xRzcv7TiRnMXBA6EI0Kj80y6o61yxm9bl7biRTv77bJ-krffXxUmKOjsG3_RMHECJTerQYFgPNZg=s2048?key=q1uc5Zl4E2bmYxn5E813ew\" style=\"width: 400px\"><\/p>\n\n\n\n<p><strong>Hyperbolic Tangent Function <\/strong><\/p>\n\n\n\n<div style=\"text-align: center\">\nf(x) = \n<math xmlns=\"http:\/\/www.w3.org\/1998\/Math\/MathML\">\n  <mrow>\n    <mi>tanh<\/mi>\n    <mo>(<\/mo>\n    <mi>x<\/mi>\n    <mo>)<\/mo>\n    <mo>=<\/mo>\n    <mfrac>\n      <mn>2<\/mn>\n      <mrow>\n        <mn>1<\/mn>\n        <mo>+<\/mo>\n        <msup>\n          <mi>e<\/mi>\n          <mrow>\n            <mo>&#8211;<\/mo>\n            <mn>2<\/mn>\n            <mi>x<\/mi>\n          <\/mrow>\n        <\/msup>\n      <\/mrow>\n    <\/mfrac>\n    <mo>&#8211;<\/mo>\n    <mn>1<\/mn>\n  <\/mrow>\n<\/math>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><img decoding=\"async\" width=\"396px;\" height=\"309px;\" src=\"https:\/\/lh7-rt.googleusercontent.com\/slidesz\/AGV_vUdJxDo4-gC1SRttB0RYfU-tWKq4kxboiTNFpAnkOMPomYDo-slmO9IkySiTRFwil3QVqjucdegFDz_HGf0-f8u6Q28-mEte2Vibn9Asntya-1xMHGLQghfD5fnh0ZPCNM32Ghbe6HkwkivR-yJX2x7fm7lanAzb=s2048?key=q1uc5Zl4E2bmYxn5E813ew\"><\/p>\n\n\n\n<p><img decoding=\"async\" width=\"433px;\" height=\"331px;\" src=\"https:\/\/lh7-rt.googleusercontent.com\/slidesz\/AGV_vUftB4_j3xjKfb4cGTpDvUK1HiQeV7brm-NNVo1tUgDFM9RKP-H3r-LgMHnjh6XgEQRV0mUn3DCyqcAf3qidNwkjXynzV2txeID1DwV6O-6SxmcglGJ-cf8q6q5f3ZUj_6MEN99I9Rlym_tZBcWdcU57hIbLMOGs=s2048?key=q1uc5Zl4E2bmYxn5E813ew\"><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><img decoding=\"async\" width=\"477px;\" height=\"366px;\" src=\"https:\/\/lh7-rt.googleusercontent.com\/slidesz\/AGV_vUf1ccrYre7vd0m3Apg_1_ySeE-7yqhYEW2ARK7NUceSEEfdioK77ACUkWeApXnINPFUS2B-p6cJa92tQ28zuHob866PonQGAnSl3JQbslpxYN2a2Q-PCL9oJIP9sJR3663_GU2OC43E5QkCvtjKKVLztHhjYpG8=s2048?key=q1uc5Zl4E2bmYxn5E813ew\"><\/p>\n\n\n\n<p><img decoding=\"async\" width=\"468px;\" height=\"358px;\" src=\"https:\/\/lh7-rt.googleusercontent.com\/slidesz\/AGV_vUcDrAQ2aukBcyH-O12uVePJSQ716oLr_Kr2nAfQHMhlSdbuY9y9XZ7EMPpwEOGc-xAn8nzVr-RCvUilEhGltXADU1qPX8d4Kap-pI3xNMeD55Y9RgCoxAhuVjiMOS1yWiQ9SVd31YdEDLngWT7_T7F330OE4UYW=s2048?key=q1uc5Zl4E2bmYxn5E813ew\"><\/p>\n<\/div>\n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Juan Parra, Kimberly Herrera, and Eleanor Wiesler Project mentors: Silvia Sell\u00e1n, Noam Aigerman Introduction Given a surface we can represent it moving along certain trajectory in space by a swept area or swept volume. It&#8217;s a good idea to take this approach to model 3D shapes or to detect a collision of the shape [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[],"ppma_author":[12,36,18],"class_list":["post-2144","post","type-post","status-publish","format-standard","hentry","category-research"],"authors":[{"term_id":12,"user_id":0,"is_guest":1,"slug":"cap-ewiesler","display_name":"ewiesler","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","author_category":"","first_name":"","last_name":"","user_url":"","job_title":"","description":""},{"term_id":36,"user_id":0,"is_guest":1,"slug":"cap-juan-parra","display_name":"juan.parra","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","author_category":"","first_name":"","last_name":"","user_url":"","job_title":"","description":""},{"term_id":18,"user_id":0,"is_guest":1,"slug":"cap-kimberlyherrera","display_name":"kimberlyherrera","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","author_category":"","first_name":"","last_name":"","user_url":"","job_title":"","description":""}],"_links":{"self":[{"href":"https:\/\/summergeometry.org\/sgi2024\/wp-json\/wp\/v2\/posts\/2144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/summergeometry.org\/sgi2024\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/summergeometry.org\/sgi2024\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/summergeometry.org\/sgi2024\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/summergeometry.org\/sgi2024\/wp-json\/wp\/v2\/comments?post=2144"}],"version-history":[{"count":10,"href":"https:\/\/summergeometry.org\/sgi2024\/wp-json\/wp\/v2\/posts\/2144\/revisions"}],"predecessor-version":[{"id":3655,"href":"https:\/\/summergeometry.org\/sgi2024\/wp-json\/wp\/v2\/posts\/2144\/revisions\/3655"}],"wp:attachment":[{"href":"https:\/\/summergeometry.org\/sgi2024\/wp-json\/wp\/v2\/media?parent=2144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/summergeometry.org\/sgi2024\/wp-json\/wp\/v2\/categories?post=2144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/summergeometry.org\/sgi2024\/wp-json\/wp\/v2\/tags?post=2144"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/summergeometry.org\/sgi2024\/wp-json\/wp\/v2\/ppma_author?post=2144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}