Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 18 in printed book and digital formats -- plus a one-year subscription (beginning with 19.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 18.4 ('Mac to iOS')
Instant purchase and download via GumRoad!

FEATURE

On the Scene Again (Part 3)

Getting Started with SceneKit

Issue: 18.4 (July/August 2020)
Author: Stefanie Juchmes
Author Bio: Stefanie studied computer science at the university in Bonn. She came in touch with Xojo due to the work of her brother-in-law and got a junior developer position in early 2019 at Monkeybread Software.
Article Description: No description available.
Article Length (in bytes): 26,471
Starting Page Number: 38
Article Number: 18404
Resource File(s):

Download Icon project18404.zip Updated: 2020-07-01 11:01:53

Related Link(s): None

Excerpt of article text...

Welcome to the third SceneKit tutorial. In the last article we saw all the geometric primitives that can directly be built with SceneKit and we learned the basics of animation.

This time we want to solve the problem of the "Hanoi Tower." This is a mathematical brain-teaser. You have a board with three vertical pegs. At the beginning of the game on the left peg is a stack of n discs, which are ordered by their radius. This n discs stack must be transported from the left peg to the right peg. At first it sounds very easy, but we have rules for their movements.

  • You can only move the top-most disc of each stack.

  • You can't place a disc above another disc of smaller size.

  • You can only move one disc at a time.

We will be thinking about the algorithm later.

...End of Excerpt. Please purchase the magazine to read the full article.