# Example: Fractal Julia set in Mojo and Mojo GPU

**URL:** <https://forum.modular.com/t/example-fractal-julia-set-in-mojo-and-mojo-gpu/2374>\
**Category:** Community Showcase\
**Tags:** gpu\
**Created:** [October 16, 2025, 5:30am UTC](https://forum.modular.com/t/example-fractal-julia-set-in-mojo-and-mojo-gpu/2374 "2025-10-16T05:30:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![laranzu](https://sea1.discourse-cdn.com/flex001/user_avatar/forum.modular.com/laranzu/32/724_2.png) [@laranzu](https://forum.modular.com/u/laranzu)\
**Post date:** [October 16, 2025, 5:30am UTC](https://forum.modular.com/t/example-fractal-julia-set-in-mojo-and-mojo-gpu/2374/1 "2025-10-16T05:30:02Z")

</div>

As a way to learn how to run Mojo on a GPU, I wrote a Julia fractal image generator in Mojo for the CPU and then for my NVIDIA A2000 GPU. I hope this is a good starting point for other people, especially Python programmers, who haven’t written GPU side code before and think it might be too hard for them. With Mojo, no it isn’t. Mojo really is “CUDA for Python programmers”.

Plus I wrote the same program in Python and C++ for comparison. Yes, benchmarks are always tricky, but the difference between C++ and Mojo is … surprising!

> **[GitHub - laranzu/multijulia: Julia set generation in C++, Python, Mojo, Mojo...](https://github.com/laranzu/multijulia)**
>
> Julia set generation in C++, Python, Mojo, Mojo GPU

---

<div class="post-metadata">

**Author:** ![BradLarson](https://sea1.discourse-cdn.com/flex001/user_avatar/forum.modular.com/bradlarson/32/62_2.png) [@BradLarson](https://forum.modular.com/u/BradLarson)\
**Post date:** [October 16, 2025, 4:23pm UTC](https://forum.modular.com/t/example-fractal-julia-set-in-mojo-and-mojo-gpu/2374/2 "2025-10-16T16:23:39Z")

</div>

Very cool! A really fun combination might be to try integrating the calculation with the experimental work @lukas is doing with rendering from Mojo into OpenGL textures here: [GitHub - lsh/shimmer: An experiment in cross-platform rendering to OpenGL textures using Mojo as a shading language.](https://github.com/lsh/shimmer) for a live iteration or zoom into the Julia set.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex001/uploads/modular/original/1X/2751e0fbdc595a99718b216730957e9db4448cfd.jpeg) [@system](https://forum.modular.com/u/system)\
**Post date:** [April 14, 2026, 4:23pm UTC](https://forum.modular.com/t/example-fractal-julia-set-in-mojo-and-mojo-gpu/2374/3 "2026-04-14T16:23:43Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
