96 lines
3.2 KiB
C#
96 lines
3.2 KiB
C#
using LeoTurtle;
|
|
|
|
namespace SimpleDrawings;
|
|
|
|
public static class TurtlePath
|
|
{
|
|
/// <summary>
|
|
/// Executes the logic for adding turtle path steps.
|
|
/// Called automatically when the application starts.
|
|
/// </summary>
|
|
/// <param name="turtle">The <see cref="Turtle"/> instance to use</param>
|
|
public static void Walk(Turtle turtle)
|
|
{
|
|
EulerianPath(turtle);
|
|
Shapes(turtle);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Draws a 'Haus des Nikolaus' as an Eulerian path
|
|
/// </summary>
|
|
/// <param name="turtle">The <see cref="Turtle"/> instance to use</param>
|
|
private static void EulerianPath(Turtle turtle)
|
|
{
|
|
const double Distance = 6.0D;
|
|
const double ShortDistance = 4.24D;
|
|
const double LongDistance = 8.49D;
|
|
|
|
// TODO
|
|
}
|
|
|
|
/// <summary>
|
|
/// Draws several shapes.
|
|
/// </summary>
|
|
/// <param name="turtle">The <see cref="Turtle"/> instance to use</param>
|
|
private static void Shapes(Turtle turtle)
|
|
{
|
|
// TODO
|
|
}
|
|
|
|
/// <summary>
|
|
/// Draws an octagon.
|
|
/// </summary>
|
|
/// <param name="turtle">The <see cref="Turtle"/> instance to use</param>
|
|
/// <param name="startX">Initial turtle x position when starting to draw</param>
|
|
/// <param name="startY">Initial turtle y position when starting to draw</param>
|
|
private static void DrawOctagon(Turtle turtle, int startX, int startY)
|
|
{
|
|
// TODO
|
|
}
|
|
|
|
/// <summary>
|
|
/// Draws a rhombus.
|
|
/// </summary>
|
|
/// <param name="turtle">The <see cref="Turtle"/> instance to use</param>
|
|
/// <param name="startX">Initial turtle x position when starting to draw</param>
|
|
/// <param name="startY">Initial turtle y position when starting to draw</param>
|
|
private static void DrawRhombus(Turtle turtle, int startX, int startY)
|
|
{
|
|
// TODO
|
|
}
|
|
|
|
/// <summary>
|
|
/// Draws two triangles, one offset off the other.
|
|
/// </summary>
|
|
/// <param name="turtle">The <see cref="Turtle"/> instance to use</param>
|
|
/// <param name="startX">Initial turtle x position when starting to draw</param>
|
|
/// <param name="startY">Initial turtle y position when starting to draw</param>
|
|
private static void DrawTriangle(Turtle turtle, int startX, int startY)
|
|
{
|
|
// TODO
|
|
}
|
|
|
|
/// <summary>
|
|
/// Draws a single triangle at the given position and with the given size.
|
|
/// Angels are fixed.
|
|
/// </summary>
|
|
/// <param name="turtle">The <see cref="Turtle"/> instance to use</param>
|
|
/// <param name="startX">Initial turtle x position when starting to draw</param>
|
|
/// <param name="startY">Initial turtle y position when starting to draw</param>
|
|
/// <param name="longSide">Length of the side c</param>
|
|
/// <param name="shortSide">Length of sides a & b</param>
|
|
private static void DrawTriangle(Turtle turtle, double startX, double startY, double longSide, double shortSide)
|
|
{
|
|
// TODO
|
|
}
|
|
|
|
/// <summary>
|
|
/// Converts an angel from degrees to radians.
|
|
/// </summary>
|
|
/// <param name="angleDegrees">Degrees to convert</param>
|
|
/// <returns>Radians value</returns>
|
|
private static double ConvertToRadians(double angleDegrees)
|
|
{
|
|
return angleDegrees * Math.PI / 180;
|
|
}
|
|
}
|