Algebraic surfaces: Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Mindraker |
>Mindraker |
(No difference)
|
Revision as of 09:53, 6 January 2009
Introduction
This page covers another way of writing out the formulas necessary to create graphs than covered on the Parametric equations page. It may seem unnecessarily complicated at times, but as you can see, this method can provide quite complex shapes and designs.
Spindel
for x = -100,100, 1 do for y = -100,100, 1 do for z = -100,100, 1 do if (x^2)+(y^2)-(z^2)==1 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x/10, y/10, z/10)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
Kreuz
for x = -10,10, 1 do for y = -10,10, 1 do for z = -10,10, 1 do if x*y*z==0 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x, y, z)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
Gupf
for x = -100,100, 1 do for y = -100,100, 1 do for z = -100,100, 1 do if x^2+y^2+z==0 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x, z, y)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
Diabolo
for x = -100,100, 1 do for y = -100,100, 1 do for z = -100,100, 1 do if x^2==(y^2+z^2)^2 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x*1, z*1, y*1)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
Sattel/Saddle
for x = -300,300, 1 do for y = -300,300, 1 do for z = -300,300, 1 do if x^2+y^2*z+z^3==0 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x*.1, z*.1, y*.1)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
UFO
for x = -10,10, .25 do for y = -10,10, .25 do for z = -10,10, .25 do if (z^2-x^2-y^2-1)==0 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x*7, z*7, y*7)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
Trichter
for x = -10,10, .25 do for y = -10,10, .25 do for z = -10,10, .25 do if x^2+z^3==y^2*z^2 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x*4, z*4, y*4)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
Sphäre/Sphere
for x = -14,14, .25 do for y = -14,14, .25 do for z = -14,14, .25 do if x^2+y^2+z^2==25 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x*1.5, y*1.5, z*1.5)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
Fanfare/horn
for x = -14,14, .25 do for y = -14,14, .25 do for z = -14,14, .25 do if math.floor(-x^3)+math.floor(z^2)+math.floor(y^2)==0 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x*7.5, y*1, z*1)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
No title
for x = -14,14, .25 do for y = -14,14, .25 do for z = -14,14, .25 do if math.floor(x^2)+math.floor(y^2)+math.floor(z^2)==math.floor(z^4) then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x*1, z*1, y*1)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
Whitney
for x = -10,10, .25 do for y = -10,10, .25 do for z = -10,10, .25 do if math.floor(x^2)-math.floor(y^2*z)==0 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x*5, z*5, y*5)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end