Quick actions

cmd+k|ctrl+k

Navigation

Languages

Same lit code but with color

Snippet info

Language

Nim

Visibility

public

Author

bluecinderbox91-the-g.o.a.t.

Created

2019-05-09T20:30:43Z

Updated

2019-05-09T20:30:43Z

reset
to pointmaker101 :x1 :x2 :x3 :y1 :y2 :y3 :repeats
make "smallpointx 0
make "smallpointy 0
setxy :x1 :y1
circle 1
setxy :x2 :y2
circle 1
setxy :x3 :y3
circle 1
make "locator rand 3
if :locator = 0 [
  make "smallpointx [:x1 + :x2]/2
  make "smallpointy [:y1 + :y2]/2
  setxy :smallpointx :smallpointy
  circle 1
]
if :locator = 1 [
  make "smallpointx [:x2 + :x3]/2
  make "smallpointy [:y2 + :y3]/2
  setxy :smallpointx :smallpointy
  circle 1
]
if :locator = 2 [
  make "smallpointx [:x3 + :x1]/2
  make "smallpointy [:y3 + :y1]/2
  setxy :smallpointx :smallpointy
  circle 1
]
repeat :repeats - 1 [
  color[rand 256 rand 256 rand 256]
  make "locator rand 3
    if :locator = 0 [
      make "smallpointx [:x1 + :smallpointx]/2
      make "smallpointy [:y1 + :smallpointy]/2
      setxy :smallpointx :smallpointy
      circle 1
    ]
    if :locator = 1[
      make "smallpointx [:x2 + :smallpointx]/2
      make "smallpointy [:y2 + :smallpointy]/2
      setxy :smallpointx :smallpointy
      circle 1
    ]
    if :locator = 2 [
      make "smallpointx [:x3 + :smallpointx]/2
      make "smallpointy [:y3 + :smallpointy]/2
      setxy :smallpointx :smallpointy
      circle 1
    ]
]
    end
pointmaker101 250 100 400 100 400 400 10000
INFO