Vai al contenuto

Challenge 2019-02

Graphics Challenge

First write a program to draw a line on the GraphicsWindow following the mouse.

Below is a starter:

GraphicsWindow.Show()
xLast=GraphicsWindow.MouseX
yLast=GraphicsWindow.MouseY
While("True")
   x=GraphicsWindow.MouseX
   y=GraphicsWindow.MouseY
   GraphicsWindow.DrawLine(x,y,xLast,yLast)
   xLast=x
   yLast=y
EndWhile

Then make the program color the line depending on which quadrant the mouse is in.

Then make mirror images of the mouse movement to draw lines in each quadrant.

Maths Challenge

Write a program that will join up some random points to draw an irregular convex polygon (no side lines cross each other).

Irregular Polygons | Brilliant Math & Science Wiki

Banner Challenge

Make a smoothly scrolling text banner for the GraphicsWindow.
Try using different font styles, colours, transparency and other effects to make the scrolling effect as fun as possible.
Consider using Shapes or Controls, with Move or Animate.

Buttons Challenge

Make a button that moves randomly within the GraphicsWindow.
Try to make the movement smooth and pop up a message when the user manages to click the button.

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.