Article Preview
Buy Now
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):
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. Thisn
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.