Skip to content

Commit

Permalink
Merge pull request #1 from LairdStreak/turtle_curve
Browse files Browse the repository at this point in the history
Adding a line curve drawing using turtle
  • Loading branch information
shreyamalogi authored Oct 3, 2023
2 parents c2a2d78 + 5b483aa commit 589c665
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Line_Curve/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Turtle Line Curve project

Welcome to the Turtle Line Curve project project, where Laird Streak has crafted a curve using lines with a touch of creativity and vibrant colors.

## Author

- **Laird Streak**
- GitHub: [Laird Streak](https://github.com/lairdstreak)

## Project Showcase

![Line Curve Artistry](https://github.com/CodeMacrocosm/Turtle-a-Thon-23/Line_Curve/line_curve.py)

Enjoy and feel free to contribute or get inspired for your own creative projects!




21 changes: 21 additions & 0 deletions Line_Curve/line_curve.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from turtle import *
import turtle
from random import randint

colors = ['#70FF98', '#4285F4', '#FF8259', '#2B23FF']
tur = turtle.Turtle()
tur.penup()
tur.color("#4285F4", "#4285F4")

for ix in range(0, 300, 1):
color_index = randint(0, 3)
color_str = colors[color_index]
tur.color(color_str, color_str)
point1 = (0, ix)
tur.goto(point1)
tur.pendown()
point2 = (ix, 300 - ix)
tur.goto(point2)
tur.penup()

turtle.done()
Binary file added Line_Curve/linecurve.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 589c665

Please sign in to comment.