upthorn

I've been told I'm a person

Human life is more important
than property values.
All human beings deserve to be treated like human beings, not just straight white cisgendered males born in the US or its allies.


fedimast (barely)
brontosin.space/@upthorn
Discord
@upthorn

MorningSong
@MorningSong

I've always been fond of:

for y = 0 to ScreenHeight
    for x = 0 to ScreenWidth
        if (((x - CenterX) ^ 2 + (y - CenterY) ^ 2) <= Radius ^ 2) then
            pset (x, y), fillColor
        end if
    next x
next y

It's got a little less overdraw, but it checks every pixel on the screen.


upthorn
@upthorn
doneFlag = false
while (!doneFlag) 

	# reseed random so our new points aren't dependent on our old points
	random.seed()
	
	# get a random point on the screen
	x = random.randint(0, screenWidth)
	y = random.randint(0, screenHeight)
	
	# check if it's within the circle
	if (((x - CenterX)**2) + ((y - CenterY)**2)  <= r ** 2)
	
		# get a second random point on the screen
		x2 = random.randint(0, screenWidth)
		y2 = random.randint(0, screenHeight)
		
		# check if it's also within the circle
		if (((x2 - CenterX)**2) + ((y2 - CenterY)**2)  <= r ** 2)
			
			# draw a line between the points
			drawLine((x, y), (x2, y2), fillColor)
	
	# check if the circle has been filled
	doneFlag = true

	# iterate over every pixel on the screen
	for y = 0 to ScreenHeight
		for x = 0 to ScreenWidth

			# check if the pixel is part of the circle
			if (((x - CenterX) ** 2 + (y - CenterY) ** 2) <= r ** 2)

				# check if the pixel is the correct color
				if (getPix(x,y) != fillcolor)

					#if not, we aren't done
					doneFlag = false

You must log in to comment.

in reply to @upthorn's post: