forked from Anurag1/standardgalactic
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
282 lines (240 loc) · 10.1 KB
/
index.html
File metadata and controls
282 lines (240 loc) · 10.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Centerfuge Home System</title>
<style>
body {
font-family: Arial, sans-serif;
color: #333;
background-color: #f4f4f9;
margin: 0;
padding: 0;
}
header {
text-align: center;
padding: 2em;
background-color: #282c34;
color: #ffffff;
}
header h1 {
margin: 0;
font-size: 2.5em;
}
header p {
margin-top: 0.5em;
font-size: 1.2em;
color: #a8b2d1;
}
.content {
padding: 1em 2em;
max-width: 800px;
margin: auto;
}
h2 {
font-size: 1.8em;
color: #282c34;
margin-top: 1em;
}
p {
line-height: 1.6;
font-size: 1em;
}
.code-container {
background-color: #282c34;
color: #e06c75;
padding: 1em;
border-radius: 5px;
overflow-x: auto;
margin-top: 1em;
font-family: monospace;
font-size: 0.9em;
}
.image-grid {
display: flex;
flex-wrap: wrap;
gap: 10px;
justify-content: center;
}
.image-grid img {
flex: 1 1 calc(50% - 20px);
max-width: calc(50% - 20px);
margin: 10px;
border: 1px solid #ddd;
border-radius: 8px;
}
.center {
text-align: center;
margin-top: 20px;
}
</style>
</head>
<body>
<header>
<h1>Centerfuge</h1>
<p>An integrated, self-sustaining home system that spins, sorts, and sustains.</p>
</header>
<div class="content">
<h2>About the Centerfuge</h2>
<p>The Centerfuge is a central, spinning cylindrical vortex at the heart of a modern home. This system continuously rotates to sort, distribute, and manage materials essential for home maintenance and sustainability. It performs various functions, such as building and repairing structures, creating clothing, and processing food, while hyperbolating waste.</p>
<h2>Hyperbolation Process</h2>
<p>Hyperbolation is the unique process of wrapping materials in layered yarn-like balls, known as <em>gnotobiotic hyperballs</em> or <em>cognets</em>. This packaging helps label, store, and utilize materials effectively within the Centerfuge.</p>
<h2>Small World Generator</h2>
<p>This Python code snippet demonstrates how to create a miniature spherical world in Blender. The script generates an outer water sphere and an inner terrain sphere with varied textures for a more lifelike appearance.</p>
<img src="small-world.png" alt="Rendered Small World Example">
<div class="code-container">
<pre><code>
import bpy
import bmesh
import random
import math
from mathutils import Vector, noise
# Clear existing objects
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete()
def create_outer_sphere():
# Create smooth outer sphere (ocean)
bpy.ops.mesh.primitive_uv_sphere_add(radius=2.0, location=(0, 0, 0))
outer_sphere = bpy.context.active_object
outer_sphere.name = 'OuterSphere'
# Add subdivision surface modifier
subsurf = outer_sphere.modifiers.new(name="Subsurf", type='SUBSURF')
subsurf.levels = 2
# Create ocean blue material
blue_mat = bpy.data.materials.new(name="OceanMaterial")
blue_mat.use_nodes = True
nodes = blue_mat.node_tree.nodes
nodes["Principled BSDF"].inputs["Base Color"].default_value = (0.0, 0.3, 0.8, 1)
nodes["Principled BSDF"].inputs["Roughness"].default_value = 0.2
nodes["Principled BSDF"].inputs["Specular"].default_value = 0.8
# Add subtle wave texture
wave_tex = nodes.new('ShaderNodeTexNoise')
wave_tex.inputs["Scale"].default_value = 8.0
wave_tex.inputs["Detail"].default_value = 6.0
# Add color ramp for water variation
color_ramp = nodes.new('ShaderNodeValToRGB')
color_ramp.color_ramp.elements[0].position = 0.4
color_ramp.color_ramp.elements[0].color = (0.0, 0.2, 0.7, 1)
color_ramp.color_ramp.elements[1].color = (0.1, 0.4, 0.9, 1)
blue_mat.node_tree.links.new(wave_tex.outputs["Fac"], color_ramp.inputs["Fac"])
blue_mat.node_tree.links.new(color_ramp.outputs["Color"], nodes["Principled BSDF"].inputs["Base Color"])
outer_sphere.data.materials.append(blue_mat)
return outer_sphere
def create_inner_sphere():
# Create inner crumpled sphere (land)
bpy.ops.mesh.primitive_uv_sphere_add(radius=1.8, location=(0, 0, 0))
inner_sphere = bpy.context.active_object
inner_sphere.name = 'InnerSphere'
# Create bmesh for detailed manipulation
bm = bmesh.new()
bm.from_mesh(inner_sphere.data)
# Generate random seed for unique crumpling pattern
random_seed = random.randint(0, 1000)
# Add randomized noise displacement to vertices
for v in bm.verts:
# Generate noise based on vertex position and random seed
noise_val = noise.noise(v.co * 2.0 + Vector((random_seed, random_seed, random_seed)))
# Add secondary noise layer for more variation
noise_val2 = noise.noise(v.co * 4.0 + Vector((-random_seed, random_seed, -random_seed))) * 0.5
displacement = (noise_val + noise_val2) * 0.4
v.co += v.normal * displacement
# Update mesh
bm.to_mesh(inner_sphere.data)
bm.free()
# Add subdivision surface modifier
subsurf = inner_sphere.modifiers.new(name="Subsurf", type='SUBSURF')
subsurf.levels = 2
# Add displacement modifier for additional detail
displace = inner_sphere.modifiers.new(name="Displace", type='DISPLACE')
displace.strength = 0.2
# Create terrain material
terrain_mat = bpy.data.materials.new(name="TerrainMaterial")
terrain_mat.use_nodes = True
nodes = terrain_mat.node_tree.nodes
links = terrain_mat.node_tree.links
# Create more complex terrain texture
noise1 = nodes.new('ShaderNodeTexNoise')
noise1.inputs["Scale"].default_value = 5.0
noise1.inputs["Detail"].default_value = 8.0
noise1.inputs["W"].default_value = random_seed * 0.1 # Use random seed for variation
noise2 = nodes.new('ShaderNodeTexNoise')
noise2.inputs["Scale"].default_value = 10.0
noise2.inputs["Detail"].default_value = 4.0
noise2.inputs["W"].default_value = -random_seed * 0.1 # Different variation
# Mix noises
mix = nodes.new('ShaderNodeMixRGB')
mix.blend_type = 'MULTIPLY'
mix.inputs["Fac"].default_value = 0.5
# Create color ramp for terrain variation
color_ramp = nodes.new('ShaderNodeValToRGB')
color_ramp.color_ramp.elements[0].position = 0.3
color_ramp.color_ramp.elements[0].color = (0.1, 0.4, 0.1, 1) # Dark green
color_ramp.color_ramp.elements[1].position = 0.7
color_ramp.color_ramp.elements[1].color = (0.2, 0.6, 0.2, 1) # Light green
# Add some brown/mountain variations
mountain_ramp = nodes.new('ShaderNodeValToRGB')
mountain_ramp.color_ramp.elements[0].position = 0.6
mountain_ramp.color_ramp.elements[0].color = (0.2, 0.6, 0.2, 1) # Green
mountain_ramp.color_ramp.elements[1].color = (0.4, 0.3, 0.2, 1) # Brown
# Connect nodes
links.new(noise1.outputs["Fac"], mix.inputs[1])
links.new(noise2.outputs["Fac"], mix.inputs[2])
links.new(mix.outputs["Color"], color_ramp.inputs["Fac"])
links.new(mix.outputs["Color"], mountain_ramp.inputs["Fac"])
# Mix terrain colors
mix_terrain = nodes.new('ShaderNodeMixRGB')
mix_terrain.inputs["Fac"].default_value = 0.5
links.new(color_ramp.outputs["Color"], mix_terrain.inputs[1])
links.new(mountain_ramp.outputs["Color"], mix_terrain.inputs[2])
links.new(mix_terrain.outputs["Color"], nodes["Principled BSDF"].inputs["Base Color"])
# Add roughness variation
nodes["Principled BSDF"].inputs["Roughness"].default_value = 0.8
inner_sphere.data.materials.append(terrain_mat)
return inner_sphere
def setup_scene():
# Create camera
bpy.ops.object.camera_add(location=(6, -6, 4))
camera = bpy.context.active_object
camera.rotation_euler = (math.radians(60), 0, math.radians(45))
# Create key light (sun)
bpy.ops.object.light_add(type='SUN', location=(5, 5, 10))
sun = bpy.context.active_object
sun.data.energy = 5.0
# Add fill light for better details
bpy.ops.object.light_add(type='AREA', location=(-4, -4, 2))
fill = bpy.context.active_object
fill.data.energy = 2.0
# Set up world background
world = bpy.context.scene.world
if not world:
world = bpy.data.worlds.new("World")
bpy.context.scene.world = world
world.use_nodes = True
world.node_tree.nodes["Background"].inputs["Color"].default_value = (0.01, 0.01, 0.02, 1)
# Create the scene
outer_sphere = create_outer_sphere()
inner_sphere = create_inner_sphere()
setup_scene()
# Set render engine to Cycles for better quality
bpy.context.scene.render.engine = 'CYCLES'
bpy.context.scene.cycles.samples = 128
# Set active camera
bpy.context.scene.camera = bpy.data.objects["Camera"]
</code></pre>
</div>
<h2>Tetraorthodrome</h2>
<div class="image-grid">
<img src="earthsphere-01.png" alt="Earthsphere 01">
<img src="earthsphere-02.png" alt="Earthsphere 02">
<img src="earthsphere-03.png" alt="Earthsphere 03">
<img src="earthsphere-04.png" alt="Earthsphere 04">
</div>
</div>
<div class="center">
<a href="https://github.com/standardgalactic/Centerfuge/blob/master/index.html" target="_blank" style="text-decoration: none; color: #007bff;">
Edit this page
</a>
</div>
</body>
</html>