So my kid has been playing with Roblox for some time now. I’m not here to explain what it is, rather this post is specific to graphing mathematical objects in Roblox with Lua scripting.
The video and the code that follows is all that you need to graph a Heart Curve (cardoid) in Roblox using Lua scripting without having to add ANY objects from the toolbox.
Feel free to check out my Roblox Lua scripts at GitHub.
for x = -1,1,.01 dolocal q = math.sqrt(1-x*x)local y0 = math.sqrt(x*x) - qlocal y1 = math.sqrt(x*x) + qlocal xa = ((x+1)*160)local ya = ((y0+1)*100)local yb = ((y1-1)*100)print(xa,200-ya)print(xa,40-yb)print(yb)end