SpinningPolyhedra 4+

Keith Bromley

    • Gratuit

Captures d’écran

Description

SpinningPolyhedra is an open-source multi-platform app (using SwiftUI, Swift, and Xcode) providing sample code of what can be done using Apple's' SceneKit API. It renders various spinning polyhedra.

This app runs on macOS, iOS, and iPadOS devices. The source code can be downloaded from https://github.com/Keith-43/SpinningPolyhedra .

The ContentView struct provides the user interface to the app.

It provides a top toolbar allowing the user to select the mesh geometry she wants to display. The nine options are:
Plane,
Tetrahedron,
Cube,
Octahedron,
Dodecahedron,
Cuboctahedron,
Icosahedron,
Rhombicuboctahedron, and
TruncatedIcosahedron.

It also provides a toolbar allowing the user to select the desired display mode. The seven options are:
solid,
edges,
solid + edges,
faces,
faces + edges,
multiSolid, and
multiSolid + edges.

Between these two toolbars is the main visualization pane rendering the desired View.

It also provides a bottom toolbar allowing the user to select the desired color of the solids. The ten options are:
gold,
pomegranate,
green,
blue,
cyan,
magenta,
Netherlands orange,
Brazil yellow,
Argentina blue, and
Liverpool red.

The solid body is rendered with a shiny metallic color (as selected in the bottom toolbar). The edges (comprised of thin cylinders) are rendered with a simple orange color. And the faces are each rendered with a different value of the hue color gamut. In my humble opinion, the result is pretty impressive. It looks partcularly striking when viewed in Dark Mode.

The multiSolid bodies are six of whichever polyhedron is selected in the top toolbar. Each has a different radius and is at a different distance from the camera. Each one spins on a different axis and at a different rate.

A drag gesture (using either macOS or iOS) moves the x,y position of the camera - while it remains pointed at the center of the largest polyhedron.

Similarly, a pinch gesture (using either macOS or iOS) zooms the rendered image as desired.

Confidentialité de l’app

Le développeur Keith Bromley a indiqué que le traitement des données tel que décrit ci‑dessous pouvait figurer parmi les pratiques de l’app en matière de confidentialité. Pour en savoir plus, consultez la politique de confidentialité du développeur.

Données non collectées

Le développeur ne collecte aucune donnée avec cette app.

Les pratiques en matière de confidentialité peuvent varier, notamment en fonction des fonctionnalités que vous utilisez ou de votre âge. En savoir plus

Du même développeur