Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function renderHeart(angle)
- local scale = 10
- for y = 2 * scale, -scale, -1 do
- local line = ""
- for x = -6 * scale, 7 * scale do
- if ((x / scale) ^ 2 + (y / scale) ^ 2 - 1) ^ 3 - (x / scale) ^ 2 * (y / scale) ^ 3 <= 0 then
- line = line .. "*"
- else
- line = line .. " "
- end
- end
- print(line)
- end
- end
- function main()
- local angle = 0
- while true do
- renderHeart(angle)
- angle = angle + 2
- os.sleep(0.1)
- end
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment