Simon is talking about various shapes having various number of dimensions, which, oddly enough, doesn’t have to be a whole number. Based on maths tutorials on 3Blue1Brown channel, that Simon has been watching a lot over the past several days.

Skip to content
# Tag: geometry

# Fractal Dimensions

# Vector Math in Codea with Box2D. Simon’s own code.

# Simon’s Codea Tutorials and the Arc-Tangent

# Magnitude of a 3D vector

# Infinite Line in Processing. Simon’s own code.

# Ellipse Mode and Physics Lab tests translated from Codea into Processing

# Smart Rockets Coding Challenge translated into Processing (Java)

# Perlin Noise Combined with Sine Wave Translation into Processing

# Polar to Cartesian converter (Simon’s own code)

# Pinball Dilemma. Simon’s own code.

This blog is about Simon, a young gifted programmer, who had to move from Amsterdam to Antwerp to be able to study at the level that fits his talent, i.e. homeschool.

Simon is talking about various shapes having various number of dimensions, which, oddly enough, doesn’t have to be a whole number. Based on maths tutorials on 3Blue1Brown channel, that Simon has been watching a lot over the past several days.

Simon built a program in Codea visualizing the absolute value of a vector:

A set of awesome Codea tutorials that Simon recorded for those who are just starting to program in Codea. Simon ported examples from Processing (java) into Codea (Lua):

In the second tutorial (in two parts), Simon explains how to write a physics simulation program in Codea using forces like gravity, friction and spring force. Anyone watching will get to use some trigonometry and see what arc-tangent is for! The original code in Java comes from Keith Peters (Processing).

Here are some notes from when Simon was explaining the arc-tangent to me the other day:

Here Simon explains how to calculate the magnitude of a 3D vector. This is something he partially figured out on his own and partially learned from Daniel Shiffman’s tutorial on Trigonometry and Polar Coordinates.

A beautiful project in Processing (Java), Simon’s own code, resembling an El Lissitzky painting that you can control and change with the mouse (without Simon knowing El Lissitzky). Resulted from thinking about and playing with infinite line and line segments. Simon used the following formula: *slope times x plus yIntercept*.

Some more translations, this time from Codea (Lua) into Processing (Java).

Ellipse Mode:

Blend Modes:

Physics Lab tests from Codea:

And here is Simon’s translation of Daniel Shiffman’s Smart Rockets Coding Challenge into Processing (Java). This challenge (originally in JavaScript) was about implementing a genetic algorithm from scratch and create “smart rockets” (based on a simulation by Jer Thorp). The rockets evolve the “best” path to a target, moving around obstacles.

Simon translated Daniel Shiffman’s Graphing 1D Perlin Noise tutorial into Processing (Java). The project involved combining perlin noise and sine wave:

He also attempted to translate Perlin Noise Flow Field into Processing:

Simon built a Polar to Cartesian converter (Simon’s own code). You can enter the radius in pixels and the angle in degrees, click “convert” and you get the coordinates in x and y and a circle appears n that spot.

You are welcome to play with Simon’s converter online in CodePen at: https://codepen.io/simontiger/pen/MmdodP

Simon is also planning to make a similar converter for Spherical to Cartesian (where you would enter radius, latitude and longitude and convert those into x,y,z).

Here Simon explains the formulas to convert between Polar and Cartesian coordinates:

Simon heard the word “pinball” and looked it up on Google (never played it himself). He then decided to write a pinball program in Processing (Java), but soon encountered a mathematical dilemma: the flippers at the bottom of the canvas (their role is to protect the ball from falling) didn’t stop rotating the way Simon wanted. This slowly unfolded into a real drama.

Here Simon explains the problem:

As his math tutor came to give Simon his regular math lesson, Simon turned to him for help and they thought to have solved the problem by applying cosine and setting it to 1. But after the teacher left Simon realized that the angular velocity of the flipper was too high for the cosine to reach 1, which would mean the flipper wouldn’t stop. Unless approximate values could be programmed, which Simon said he doubted. Simon was crying hard. We just sat there hugging after we recorded this:

Then Simon tried writing an approximate function.

I’m not sure he will come back to this unfinished project. It is all part of his learning experience and learning to apply math/ physics though.

Approximate cosine:

Approximate Function and 1D distance function: