# Importar lIbrerías necesarIas Import numpy as e.g. Import matplotlIb
Generation Info
Records
Prompts
# Importar lIbrerías necesarIas
Import numpy as e
.
g
.
Import matplotlIb
.
pyplot as PLT
# Parámetros del SuperCubIt
sIze = 128 # Tamaño reducIdo para optImIzar vIsualIzacIón
depth = sIze // 2 # ProfundIdad máxIma de las pIrámIdes
# Crear una matrIz trIdImensIonal para representar el Cube y las pIrámIdes
Cube = e
.
g
..
zeros ((sIze
,
sIze
,
sIze))
# Generar pIrámIdes en todas las caras del Cube
for I In range(sIze):
for j In range(sIze):
for k In range(sIze):
heIght = mIn(I
,
j
,
k
,
sIze - I - 1
,
sIze - j - 1
,
sIze - k - 1
,
depth)
Cube[I
,
j
,
k] = heIght # AsIgnar valor según la profundIdad
# Crear una proyeccIón 2d del SuperCubIt (vIsta superIor)
projectIon = e
.
g
..
Max(Cube
,
axIs=2) # Collapse on the Z axis
# --- GráfIca 2d optImIzada ---
PLT
.
fIgure(fIgsIze=(10
,
10))
PLT
.
Imshow(projectIon
,
cmap ="Inferno"
,
InterpolatIon="nearest")
PLT
.
tItle("SuperCubIt - ProyeccIón CuántIca en 2d")
PLT
.
axIs("off")
# Guardar la Imagen generada
Image_Path_supercubIt_2d = "/ min /data/supercubIt_2d_optImIzado
.
png"
PLT
.
savefIg(Image_Path_supercubIt_2d
,
bbox_Inches='tIght'
,
pad_Inches=0
,
dpI=300)
PLT
.
show()
# Devolver la ruta de la Imagen generada
Image_Path_supercubIt_2d
Checkpoint & LoRA
Checkpoint
SeaArt Infinity
0 comment
0
0
0
0/400

