Julia Set Generator Written In Golang

Julia Set Generator Written In Golang

This is a simple (naive) Julia Set generator written in Golang. The project utilizes concurrent workers to speed up processing speed. This project creates a set of png images which can be used by Ffmpeg to create an mp4 video showing an animated julia set.

Dependencies

FFMPEG - video processing tool which can produce a video from a set of images github.com/muesli/gamut - for generating color pallets.

Needed Improvements

  • In memory frame storage
    • Currently, each frame of the desired animation will be stored as a png file on your computers file system. This uses a large amount of hard drive space and likely slows the entire process down somewhat. Ideally, frames should be stored in memory until they are passed to ffmpeg. Currently, they are stored within the filesystem for simplicity, as it allows you to just easily run a ffmpeg command to produce a mp4 video
  • Improved efficiency
    • I'm sure there are a few ways to speed this project up computationally, aside from just throwing more CPU cores at it.
  • Automatic FFMPEG video creation
    • Having this tool automatically create a video would be cool, as opposed to having to manually run an FFMPEG command.

Some Good Starting values

Different julia sets can be created by using different values for the constant real and constant imaginary values, here are some good values to produce a few julia sets that are interesting to look at

cReal cImaginary Increment endRange
-0.8 0.156 0.00001 0.0028
-0.4 0.6 0.0001 .05
0.280 0.01 0.00001 0.005

additional values can be found on various sites, such as wikipedia.

How to create a video of a julia set

Using this repository will create a set of png's, in essence, video frames. to produce an actual mp4 you can use the following FFMPEG commands. Ensure that you run these commands within the repository. These commands could likely be improved to provide greater image quality and better compression.

Windows: ffmpeg -framerate 30 -i img%04d.png -c:v libx264 -pix_fmt yuv420p out.mp4

MacOS: ffmpeg -framerate 30 -pattern_type glob -i '*.png' -c:v libx264 -pix_fmt yuv420p out.mp4

What is a julia set?

According to Britannica,

In general terms, a Julia set is the boundary between points in the complex number
plane or the Riemann sphere (the complex number plane plus the point at infinity)
that diverge to infinity and those that remain finite under repeated iteration of
some mapping (function). 

Julia set's are an interesting view into fractals and how mathematics and art can intersect. Even without an in depth appreciation for the mathematics at play, almost everyone can appreciate the resulting images / videos. Here are some examples,

example 1 example 2 example 3

Owner
Software Engineer At LifePod Solutions, focused on Golang, Test Automation, & micro-service development. Interested in full stack dev, NLP & cloud technology
null
Similar Resources

Rest Api Generator for Golang Programming Language

Rest Api Generator for Golang Programming Language

Nov 29, 2021

A prototype code-generator library for golang.

A prototype code-generator library for golang.

Jul 28, 2022

Golang Fake data generator

Fake data generator. Written in Go Installation Faker requires Go 1.17 go get

Nov 16, 2022

Versatile Go code generator.

Versatile Go code generator.

Generis Versatile Go code generator. Description Generis is a lightweight code preprocessor adding the following features to the Go language : Generic

Nov 30, 2022

An enum generator for go

go-enum An enum generator for go How it works The goal of go-enum is to create an easy to use enum generator that will take a decorated type declarati

Dec 22, 2022

Jennifer is a code generator for Go

Jennifer Jennifer is a code generator for Go. package main import ( "fmt" . "github.com/dave/jennifer/jen" ) func main() { f := NewFile("m

Jan 4, 2023

Fast and scalable pseudorandom generator for Go

fastrand Fast pseudorandom number generator. Features Optimized for speed. Performance scales on multiple CPUs. How does it work? It abuses sync.Pool

Dec 22, 2022

Clean-Swift source and test code auto-generator. It can save you time typing 500-600 lines of code.

Clean-Swift source and test code auto-generator. It can save you time typing 500-600 lines of code.

Clean-Swift source & test code auto generator Overview Run Output Basic Usage make config.yaml target_project_name: Miro // target project name copyri

Apr 13, 2022

Fast, scalable pseudo random number generator based on xxh3

Fast, scalable pseudo random number generator based on xxh3

XXH3-Based Pseudorandom Number Generator This package contains an experimental implementation of a noise based pseudorandom number generator that scal

Nov 24, 2022
Related tags
A fully Go userland with Linux bootloaders! u-root can create a one-binary root file system (initramfs) containing a busybox-like set of tools written in Go.

u-root Description u-root embodies four different projects. Go versions of many standard Linux tools, such as ls, cp, or shutdown. See cmds/core for m

Dec 29, 2022
Golang 1.18+ Generics implementation of Set methods

Golang Generics: Set A golang 1.18+ implementation of Set using Go generics Installation $ go get -u github.com/chrispappas/golang-generics-set Quick

Oct 26, 2022
Galvanity is Algorand vanity address generator written in Go

Galvanity Galvanity is Algorand vanity address generator written in Go Usage galvanity [search-type] <pattern> search-type is matching function to sea

Nov 14, 2022
Rhythm - Euclidean Rhythm generator written in Go with nested circular lists 🤹

rhythm Euclidean Rhythm generator written in Go with nested circular lists ?? Us

Jan 31, 2022
Automatically set GOMAXPROCS to match Linux container CPU quota.

automaxprocs Automatically set GOMAXPROCS to match Linux container CPU quota. Installation go get -u go.uber.org/automaxprocs Quick Start import _ "go

Dec 29, 2022
A set of instrumentation features for collecting relevant tracing data as well as secure an application

Go Agent goagent provides a set of instrumentation features for collecting relevant tracing data as well as secure an application by blocking requests

Dec 21, 2021
redis-util business-friendly encapsulation of redis operations, such as the common cache set get operation

redis-util 方便业务使用的redis操作封装,比如常见的缓存set get操作, 一行代码搞定,不像开源库需要写好多行 使用方法

Oct 22, 2021
Simple utility to get/set the PWM duty cycle and to measure the RPM for a fan connected to the 4-pin header on the CM4IO.

cm4iofan Simple utility to get/set the PWM duty cycle and to measure the RPM for a fan connected to the 4-pin header on the CM4IO. Requirements Enable

Mar 31, 2022
This Go package allows you to set handler functions that run when named events occur

This Go package allows you to set handler functions that run when named events occur

Feb 10, 2022
Color generator with golang
Color generator with golang

color-generator How to use this repo <img src="https://color-pallete-gen.herokuapp.com/hexCode" /> Like this: Getting Started Copy sample.env to .env

Oct 22, 2021