Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solving a pattern. Stuck...
#1
Hi all,

I am currently trying to create geometries from a list of point (0-9) and need to organize the points.
The points look like this:

0
1 2
3 4 5
6 7 8 9

what i need to is create sets of triangles so i need to organize the points like this:
[0,1,2,0]
[1,3,4,1]
[1,2,4,1]
[2,4,5,2]
[3,6,7,3]
[3,4,7,3]
[4,7,8,4]
[4,5,8,4]
[5,8,9,5]

the first and last points always repeat to create a closed triangle.

Any thoughts? I made the first triangle but can't find the pattern for all the rest.
Reply
#2
what do your attempts look like, and where do you believe the problems are located, show code.
Reply
#3
And more explanation, please. I don't understand how the triangles related to the four item lists.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020