We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Challenge 12 - Rotating triangle
#1
Create a triangle shape in the center of a GraphicsWindow and rotate it left and right with arrow keys.

This is trickier than you may think NOT using an extension and will need some experimentation to work out the rules for it.

When you get this you could extend to using the line shape to make clock hands.
[-] The following 1 user Likes litdev's post:
  • AbsoluteBeginner
Reply
#2
LitDev,

Is this what you want for this?

GCKH495.000

JR
[-] The following 1 user Likes jrmrhrb00's post:
  • litdev
Reply
#3
Hello.  Shy

Maybe LitDev meant to create a triangle and rotate it around the center of the graphics window?  Undecided

If you just create a triangle in the center of the window and rotate it, then it's too simple.
Reply
#4
AB,

I thought he meant to rotate the triangle around the triangle's own center. We'll see.

JR
Reply
#5
My solution for four different situations  TZNX670.000
[-] The following 4 users Like WhTurner's post:
  • AbsoluteBeginner, jrmrhrb00, litdev, z-s
Reply
#6
WHTurner,

Good program. I didn't think about showing that way!

JR
Reply
#7
Yes, an interesting program.  Shy

It would be cool to be able to go back to the start screen to choose another option to watch.  Blush
Reply
#8
(02-23-2025, 12:16 AM)jrmrhrb00 Wrote: LitDev,

Is this what you want for this?

GCKH495.000

JR

Yes, that all it is - about understanding where the center of rotaion comes from for triangles and lines - the idea came from this question:

https://learn.microsoft.com/en-us/answer...ngle-issue
Reply
#9
(02-23-2025, 06:19 PM)WhTurner Wrote: My solution for four different situations  TZNX670.000

Yes this is the idea, but I was suggesting using the Shapes.Rotate command which would need more investigation into what how the rotation with triangles and lines is achieved.

Here is my effort where I try to explain how the rotation for these shapes work, DLMQ566.000
[-] The following 1 user Likes litdev's post:
  • AbsoluteBeginner
Reply
#10
This is interesting.  Rolleyes

I have never faced such a task before.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)