Algebraic surfaces: Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Mindraker No edit summary |
>Mindraker No edit summary |
||
Line 132: | Line 132: | ||
end | end | ||
</pre> | </pre> | ||
== UFO == | |||
[[Image:Algebraic6.PNG|thumb|UFO]] | [[Image:Algebraic6.PNG|thumb|UFO]] | ||
Line 156: | Line 158: | ||
end | end | ||
</pre> | </pre> | ||
== Trichter == | |||
[[Image:Algebraic7.PNG|thumb|Trichter]] | [[Image:Algebraic7.PNG|thumb|Trichter]] | ||
Line 179: | Line 183: | ||
end | end | ||
end | end | ||
</pre> | |||
== Sphäre/Sphere == | |||
[[Image:Algebraic8.PNG|thumb|Sphäre/Sphere]] | |||
<pre> | |||
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 | |||
</pre> | </pre> | ||
Revision as of 01:01, 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