

""" Rosetta Code task /wiki/Babylonian_spiral """ using GLMakie const squarecache = Int """ Get the points for a Babylonian spiral of `nsteps` steps.

OEIS:A297346 - List of successive x-coordinates in the Babylonian Spiral.OEIS:A256111 - squared distance to the origin of the n-th vertex on a Babylonian Spiral.
#PYTHON CODE FOR BABYLONIAN NUMERALS HOW TO#
Show in your program how to calculate and plot the first 10000 points in the sequence. List of possible sums of two integer squares, including 0 as a square.įind and show the first 40 (x, y) coordinates of the Babylonian spiral. The lengths of the vectors thus determined can be given by a sorted Note the length of the vectorįrom P(2) to P(3) is √2, which squared is 2. The point chosen for P(3) that fits criteria is (x = 1, y = 2). More than zero radians, but otherwise to the least degree. Point with integral (x, y) which is longer than the last vector (that is, 1). This should be the smallest distance to a Next in sequence is the vector from P(2) to P(3). Note that the square of that length is 1.

P(1) and P(2) are defined to be at (x = 0, y = 0) and (x = 0, y = 1). Of length and angle, the length has priority. While always moving from point to point on strictly integral coordinates. The Babylonian spiral is a sequence of points in the plane that are created so as toĬontinuously minimally increase in vector length and minimally bend in vector direction, It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page. Babylonian spiral is a draft programming task.
