Giter Club home page Giter Club logo

apollonia_gasket's Introduction

Apollonian Gasket

en pt-br

A small study project on the Apollonian Gasket fractal, which consists of creating a new tangential circle from 3 tangential circles and then continuing to create tangentials circles for every 3 previous ones.

Apollonian Gasket Fractal

This project was inspired by a lesson from Professor The Coding Train, including much of the complex number code he uses, although the generation of circles does not have a direct relationship.

Creation Methods

  1. A first circle is created with a diameter based on the smallest available measurement on the display.
  2. Based on click or drag/pan, an internal circle is created with its center at the point and a radius tangential to the external circle.
  3. Then a second internal circle is created with a radius equal to the difference between the diameter of the external circle and the diameter of the first internal circle, its center is positioned at the angle between the two centers using trigonometry and the properties of the unit circle.
  4. Using the three tangential circles, Descartes' Theorem is applied to find the curvature of the next tangentials circles.
  5. With the curvatures of the new tangentials circles, the possible centers of these new circles are calculated using the complex Descartes' Theorem.
  6. With the new circles in hand, a loop is created to generate new tangential circles for each set of 3 new tangential circles.

Project Structure

The project used Signals for state control and a simple division of entity objects from the interface.

Observations

  • The quadratic formulas were taken directly from the Wikipedia article https://en.wikipedia.org/wiki/Descartes%27_theorem.
  • Dart provides packages with classes for complex numbers, but following the Coding Train professor's video, I created my own class for study purposes, although much of the code was observed in the same video's code.
  • All interface and circle creation methods were kept in the same file home_screen.dart to facilitate those who wish to study the code.

Example

  • The project was tested and is more functional when considering a Windows application.
  • But it also runs on the web platform (example below); however, on mobile browsers, the experience is greatly reduced, both due to the interface size, performance, and the lack of mouse finesse.

Site Exemplo

PrintScreen

apollonia_gasket's People

Contributors

jillytaboga avatar

Stargazers

Walicen Dalazuana avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.