Algebraic surfaces

From Legacy Roblox Wiki
Revision as of 09:57, 5 January 2009 by >Mindraker
Jump to navigationJump to search

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/Hourglass
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

Kreuz/Cross
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

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 


See Also

Algebraic Surfaces