GithubHelp home page GithubHelp logo

roland-schmitz-academy / wwdc20-spiralfield Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 1.81 MB

WWDC20 Swift Student Challenge Playground showing affine transformations in SwiftUI

License: MIT License

Swift 100.00%
swiftui playgroundbook wwdc20 wwdc affine-transformation

wwdc20-spiralfield's Introduction

Spiral Field - WWDC20 Swift Student Challenge Award Winner

Spiral Field Playground, Page 4

TL;DR

Run the Spiral Field.playgroundbook with the Playgrounds app on a Mac or an iPad.

There is also an app version which runs on iOS and on macOS. Just open the WWDC Spirals.xcodeproj with Xcode and run it.

The story behind my Playground

I had the idea for this playground 35 years ago in 1985 when I started coding with C and implemented a version of the Graphical Kernel System (GKS). My Playground is all about Affine Transformations. They have been very important in GKS and I created some beautiful graphics in that time.

During my work and research 35 years ago I found a special Affine Transformation which I called "Inner Rotation". When you repeatedly use this transformation to draw the same rectangle or triangle again and again you can create some really nice looking spirals.

If you then arrange the spirals in several rows and columns and optionally alternating between normal and mirrored forms of the spirals you can create some beautiful diagrams. I plotted them on paper 35 years ago, because we had no high resolution graphics screen at that time. I will probably find some of the original graphics in the attic.

The talks about SwiftUI from WWDC last year have been very exciting and fascinating for me. That's why I tried to learn all about SwiftUI. At the Developer Academy in Naples, Italy I started to use SwiftUI for real projects and I am sure it is the future for the UI part of all Apple devices.

When I realized that Affine Transformations are available and very useful in SwiftUI I eventually remembered what I learned about them 35 years ago.

In my Playground I wanted to show how easy it is to use SwiftUI and Affine Transformations to create some beautiful graphics. I used the "Inner Rotation" Transformation which I remembered from 35 years ago to create a dynamic experience where you can change the main parameters for the diagrams on the fly and get instant feedback on the iPad screen.

The Playground has 4 pages. The first two pages explain a little bit about Affine Transformations and you can experiment with them. The third page shows the Inner Rotation Transformation and how to create a nice spiral with repeatedly applying the transformation. On the last page you have the chance to play with the main parameters to create your individual favorite diagram. Have fun.

wwdc20-spiralfield's People

Contributors

roland-schmitz-academy avatar

Stargazers

 avatar  avatar  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.