```python
import bpy, math
from mathutils import Vector
from math import radians

# -------------------------
# Scene reset and utilities
# -------------------------
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete(use_global=False)
for datablocks in (bpy.data.materials, bpy.data.curves, bpy.data.meshes, bpy.data.cameras, bpy.data.lights):
    pass

def mat_principled(name, color, metallic=0.0, rough=0.45, emission=None, emission_strength=0.0, transmission=0.0, ior=1.45, alpha=1.0):
    m = bpy.data.materials.new(name)
    m.diffuse_color = (*color, alpha)
    m.use_nodes = True
    bs = m.node_tree.nodes.get("Principled BSDF")
    bs.inputs["Base Color"].default_value = (*color, 1)
    bs.inputs["Metallic"].default_value = metallic
    bs.inputs["Roughness"].default_value = rough
    if "Transmission Weight" in bs.inputs:
        bs.inputs["Transmission Weight"].default_value = transmission
    elif "Transmission" in bs.inputs:
        bs.inputs["Transmission"].default_value = transmission
    if "IOR" in bs.inputs:
        bs.inputs["IOR"].default_value = ior
    if emission:
        bs.inputs["Emission Color"].default_value = (*emission, 1)
        bs.inputs["Emission Strength"].default_value = emission_strength
    bs.inputs["Alpha"].default_value = alpha
    if alpha < 1:
        m.surface_render_method = 'DITHERED'
    return m

def emission_mat(name, color, strength=1.0):
    m = bpy.data.materials.new(name)
    m.use_nodes = True
    nt = m.node_tree
    nt.nodes.clear()
    out = nt.nodes.new("ShaderNodeOutputMaterial")
    em = nt.nodes.new("ShaderNodeEmission")
    em.inputs["Color"].default_value = (*color, 1)
    em.inputs["Strength"].default_value = strength
    nt.links.new(em.outputs[0], out.inputs["Surface"])
    return m

def add_cube(name, loc, scale, material, bevel=0.0):
    bpy.ops.mesh.primitive_cube_add(location=loc)
    o = bpy.context.object
    o.name = name
    o.scale = scale
    bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)
    if bevel:
        mod = o.modifiers.new("soft architectural edge", 'BEVEL')
        mod.width = bevel
        mod.segments = 3
    o.data.materials.append(material)
    return o

def add_cyl(name, loc, radius, depth, material, vertices=64, rotation=None, bevel=0.0):
    bpy.ops.mesh.primitive_cylinder_add(vertices=vertices, radius=radius, depth=depth, location=loc, rotation=rotation or (0,0,0))
    o = bpy.context.object
    o.name = name
    o.data.materials.append(material)
    if bevel:
        mod = o.modifiers.new("edge wear", 'BEVEL')
        mod.width = bevel
        mod.segments = 3
    return o

def add_uv(name, loc, scale, material, rotation=None):
    bpy.ops.mesh.primitive_uv_sphere_add(segments=64, ring_count=32, location=loc)
    o = bpy.context.object
    o.name = name
    o.scale = scale
    if rotation:
        o.rotation_euler = rotation
    bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)
    o.data.materials.append(material)
    return o

def add_torus(name, loc, major, minor, material, rot=(0,0,0)):
    bpy.ops.mesh.primitive_torus_add(major_radius=major, minor_radius=minor, major_segments=96, minor_segments=16, location=loc, rotation=rot)
    o = bpy.context.object
    o.name = name
    o.data.materials.append(material)
    return o

def align_z(obj, direction):
    obj.rotation_mode = 'QUATERNION'
    obj.rotation_quaternion = Vector((0,0,1)).rotation_difference(Vector(direction).normalized())

def look_at(obj, target):
    obj.rotation_euler = (Vector(target) - obj.location).to_track_quat('-Z','Y').to_euler()

def add_curve_tube(name, points, bevel, material):
    cu = bpy.data.curves.new(name, 'CURVE')
    cu.dimensions = '3D'
    cu.resolution_u = 16
    cu.bevel_depth = bevel
    cu.bevel_resolution = 5
    sp = cu.splines.new('BEZIER')
    sp.bezier_points.add(len(points)-1)
    for bp, p in zip(sp.bezier_points, points):
        bp.co = p
        bp.handle_left_type = 'AUTO'
        bp.handle_right_type = 'AUTO'
    o = bpy.data.objects.new(name, cu)
    bpy.context.collection.objects.link(o)
    o.data.materials.append(material)
    return o

# -------------------------
# Materials
# -------------------------
concrete = mat_principled("bare concrete", (0.105,0.115,0.12), metallic=0, rough=0.82)
concrete2 = mat_principled("concrete edge", (0.16,0.17,0.18), rough=0.72)
stone = mat_principled("black basalt pedestal", (0.025,0.03,0.034), metallic=0.18, rough=0.24)
brass = mat_principled("aged brass", (0.28,0.13,0.035), metallic=0.86, rough=0.29)
brass_bright = mat_principled("worn bright brass edges", (0.72,0.36,0.08), metallic=0.92, rough=0.17)
brass_dark = mat_principled("dark brass recesses", (0.11,0.045,0.012), metallic=0.78, rough=0.4)
red = mat_principled("velvet cordon", (0.25,0.008,0.012), rough=0.36)
glass = mat_principled("optical glass IOR 1.52", (0.72,0.9,1.0), rough=0.06, transmission=1.0, ior=1.52)
crystal = mat_principled("refractive crystal IOR 2.08", (0.16,0.63,0.95), rough=0.045, transmission=1.0, ior=2.08, emission=(0.03,0.25,0.8), emission_strength=0.7)
cyan = emission_mat("cyan caustic", (0.02,0.4,1.0), 5)
magenta = emission_mat("magenta fringe", (1.0,0.015,0.28), 3)
goldglow = emission_mat("hot gold glints", (1.0,0.3,0.015), 12)
whiteglow = emission_mat("white optical glint", (0.75,0.95,1.0), 18)

# -------------------------
# Gallery architecture
# -------------------------
add_cube("floor", (0,0, -0.18), (7,7,0.18), concrete, 0.04)
add_cube("rear monumental wall", (0,5.4,3.6), (7,0.22,3.8), concrete, 0.06)
add_cube("left concrete wall", (-6.7,0,3.6), (0.22,5.5,3.8), concrete, 0.06)
add_cube("right concrete wall", (6.7,0,3.6), (0.22,5.5,3.8), concrete, 0.06)
# architectural ceiling slab and vertical seams
add_cube("ceiling shadow", (0,2.5,7.2), (6.9,3.1,0.18), concrete, 0.03)
for x in (-4.0, 0, 4.0):
    add_cube("wall seam", (x,5.14,3.5), (0.018,0.012,3.4), concrete2, 0)

# pedestal
add_cube("pedestal plinth", (0,0.55,0.42), (2.15,1.55,0.42), stone, 0.12)
add_cube("pedestal upper block", (0,0.55,0.94), (1.82,1.28,0.12), stone, 0.07)
# subtle top bevel strip
add_cube("pedestal top highlight", (0,0.55,1.075), (1.72,1.18,0.018), concrete2, 0.025)

# -------------------------
# Projection wall image
# -------------------------
# image plane at front of wall, facing camera
bpy.ops.mesh.primitive_plane_add(size=2, location=(0,5.10,3.35), rotation=(radians(90),0,0))
proj = bpy.context.object
proj.name = "OTHER WORLD PROJECTION - alien horizon"
proj.scale = (2.45,1.62,1)
bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)

pm = bpy.data.materials.new("projected impossible landscape")
pm.use_nodes = True
nt = pm.node_tree
nt.nodes.clear()
out = nt.nodes.new("ShaderNodeOutputMaterial")
em = nt.nodes.new("ShaderNodeEmission")
tex = nt.nodes.new("ShaderNodeTexCoord")
sep = nt.nodes.new("ShaderNodeSeparateXYZ")
ramp = nt.nodes.new("ShaderNodeValToRGB")
ramp.color_ramp.elements.remove(ramp.color_ramp.elements[1])
e0 = ramp.color_ramp.elements[0]; e0.position=0.0; e0.color=(0.025,0.005,0.12,1)
for pos,col in [(0.28,(0.18,0.01,0.38,1)),(0.48,(0.02,0.55,0.75,1)),(0.53,(1.0,0.08,0.18,1)),(0.72,(0.45,0.015,0.09,1)),(1.0,(0.025,0.005,0.04,1))]:
    e=ramp.color_ramp.elements.new(pos); e.color=col
noise=nt.nodes.new("ShaderNodeTexNoise"); noise.inputs["Scale"].default_value=5; noise.inputs["Detail"].default_value=4; noise.inputs["Roughness"].default_value=.7
mix=nt.nodes.new("ShaderNodeMixRGB"); mix.blend_type='SCREEN'; mix.inputs[0].default_value=.22
nt.links.new(tex.outputs["Generated"],sep.inputs[0]); nt.links.new(sep.outputs["Z"],ramp.inputs[0])
nt.links.new(tex.outputs["Generated"],noise.inputs["Vector"]); nt.links.new(ramp.outputs["Color"],mix.inputs[1]); nt.links.new(noise.outputs["Fac"],mix.inputs[2])
nt.links.new(mix.outputs["Color"],em.inputs["Color"]); em.inputs["Strength"].default_value=3.8
nt.links.new(em.outputs[0],out.inputs["Surface"])
proj.data.materials.append(pm)
# horizon ring / alien sun
add_uv("impossible red sun", (-0.85,5.055,3.85), (0.34,0.025,0.34), magenta, (radians(90),0,0))
# spectral displaced edge strips
for x, colmat, w in [(-2.53,magenta,.055),(2.53,cyan,.055),(-2.43,cyan,.025),(2.43,magenta,.025)]:
    add_cube("spectral projection fringe", (x,5.075,3.35), (w,0.012,1.66), colmat, 0.02)
for z,colmat in [(1.70,cyan),(5.00,magenta)]:
    add_cube("spectral horizontal fringe", (0,5.075,z),(2.45,.012,.035),colmat,.015)

# -------------------------
# Device axis and optical assembly
# -------------------------
center = Vector((0,0.55,2.58))
axis = Vector((0,0.34,0.94)).normalized()
q = Vector((0,0,1)).rotation_difference(axis)
def along(t): return center + axis*t

# base neck
add_cyl("instrument neck", (0,0.55,1.35), .42, .45, brass_dark, bevel=.04)
add_cyl("neck collar", (0,0.55,1.55), .58, .12, brass, bevel=.025)

# gimbal rings
for i, extra in enumerate((0.0, radians(18))):
    ring = add_torus("concentric brass gimbal ring %d"%(i+1), center, 1.02 if i==0 else .82, .075, brass, (0,0,0))
    ring.rotation_mode='QUATERNION'
    ring.rotation_quaternion=q
    if i==1:
        ring.rotation_quaternion = q @ Vector((0,1,0)).rotation_difference(Vector((math.sin(extra),0,math.cos(extra))))
    # bright inset outer edge
    edge=add_torus("worn bright ring edge %d"%(i+1), center, 1.025 if i==0 else .825, .018, brass_bright)
    edge.rotation_mode='QUATERNION'; edge.rotation_quaternion=ring.rotation_quaternion

# small perpendicular gimbal pivots
for side in (-1,1):
    p = center + Vector((side*1.0,0,0))
    add_cyl("gimbal pivot", p, .13, .25, brass_bright, rotation=(0,radians(90),0), bevel=.025)

# lens stack, decreasing diameter
for idx,(t,r,thick) in enumerate([(-0.58,.68,.18),(0.0,.49,.20),(0.50,.31,.16)]):
    o=add_uv("refractive lens %d"%(idx+1), along(t), (r,r,thick), glass)
    o.rotation_mode='QUATERNION'; o.rotation_quaternion=q
    # brass retaining rim
    rim=add_torus("lens brass retaining rim %d"%(idx+1), along(t), r*.94, .045, brass_bright)
    rim.rotation_mode='QUATERNION'; rim.rotation_quaternion=q
    # small inner glow on front-facing center
    if idx==2:
        add_uv("lens hot glint", along(t-0.10), (r*.18,r*.18,.025), whiteglow).rotation_mode='QUATERNION'

# faceted crystal core
bpy.ops.mesh.primitive_ico_sphere_add(subdivisions=2, radius=.48, location=center)
core=bpy.context.object; core.name="faceted anomalous crystal core"; core.scale=(1,1,.9); core.rotation_mode='QUATERNION'; core.rotation_quaternion=q; core.data.materials.append(crystal)
# crystal internal glints, little emissive facets
for j, offs in enumerate([(-.18,-.22,.15),(.18,.12,.20),(-.05,.04,-.26)]):
    p=center + Vector(offs)
    g=add_uv("internal crystal glint",p,(.075,.075,.075),whiteglow)
# crystal waist bands
for t in (-.40,.40):
    b=add_torus("crystal brass restraint",along(t),.43,.025,brass_bright); b.rotation_mode='QUATERNION'; b.rotation_quaternion=q

# -------------------------
# Beam and caustic spill
# -------------------------
beam_start=along(.62)
beam_end=Vector((0,5.02,3.35))
vec=beam_end-beam_start; dist=vec.length; mid=(beam_start+beam_end)/2
bpy.ops.mesh.primitive_cone_add(vertices=64, radius1=.28, radius2=.82, depth=dist, location=mid)
beam=bpy.context.object; beam.name="faint volumetric projection beam"; align_z(beam,vec)
vm=bpy.data.materials.new("contained cyan beam volume"); vm.use_nodes=True
vn=vm.node_tree.nodes; vl=vm.node_tree.links
for n in list(vn): vn.remove(n)
vo=vn.new("ShaderNodeOutputMaterial"); pv=vn.new("ShaderNodeVolumePrincipled")
pv.inputs["Density"].default_value=.018; pv.inputs["Color"].default_value=(.03,.25,.8,1); pv.inputs["Emission Strength"].default_value=.15
vl.new(pv.outputs["Volume"],vo.inputs["Volume"]); beam.data.materials.append(vm)
# caustic pools on pedestal top
for x,y,s,c in [(-.65,.15,.5,cyan),(.48,.35,.42,magenta),(0,.78,.30,whiteglow)]:
    bpy.ops.mesh.primitive_cylinder_add(vertices=64, radius=s, depth=.008, location=(x,y,1.10))
    ca=bpy.context.object; ca.name="chromatic caustic spill"; ca.scale=(1,.45,1); ca.data.materials.append(c)

# -------------------------
# Cordon
# -------------------------
stanchion_positions=[(-2.75,-.65),(-2.75,2.0),(2.75,2.0),(2.75,-.65),(0,-1.25)]
for i,(x,y) in enumerate(stanchion_positions):
    add_cyl("polished brass stanchion", (x,y,.86), .075, 1.45, brass_bright, bevel=.018)
    add_cyl("stanchion foot", (x,y,.13), .25, .12, brass, bevel=.025)
    add_uv("stanchion cap",(x,y,1.60),(.13,.13,.08),brass_bright)
# rope path around front and sides
add_curve_tube("red velvet rope left",[(-2.75,-.65,1.45),(-2.75,-.05,1.38),(-2.75,2.0,1.45)],.045,red)
add_curve_tube("red velvet rope right",[(2.75,-.65,1.45),(2.75,-.05,1.38),(2.75,2.0,1.45)],.045,red)
add_curve_tube("red velvet rope front",[(-2.75,-.65,1.45),(-1.4,-1.15,1.24),(0,-1.25,1.20),(1.4,-1.15,1.24),(2.75,-.65,1.45)],.045,red)

# placard
add_cube("brass museum placard",(0,-.76,1.18),(.72,.035,.20),brass_bright,.025)
bpy.ops.object.text_add(location=(0,-.805,1.18), rotation=(radians(90),0,0))
txt=bpy.context.object; txt.name="REALITY REPROJECTION label"; txt.data.body="REALITY REPROJECTION"; txt.data.align_x='CENTER'; txt.data.align_y='CENTER'; txt.data.size=.105; txt.data.space_character=1.0; txt.data.extrude=.004
txt.data.materials.append(brass_dark)

# -------------------------
# Lights
# -------------------------
def area(name, loc, energy, size, color, target):
    data=bpy.data.lights.new(name,'AREA'); data.energy=energy; data.shape='DISK'; data.size=size; data.color=color
    o=bpy.data.objects.new(name,data); bpy.context.collection.objects.link(o); o.location=loc; look_at(o,target); return o
area("ceiling spot device",(-2.2,-1.0,6.5),850,2.0,(1.0,.72,.48),(0,.55,2.0))
area("ceiling spot placard",(2.3,-.8,6.2),500,1.5,(1.0,.55,.25),(0,-.5,1.0))
area("cool wall projection spill",(0,3.0,4.8),400,2.0,(.12,.35,1.0),(0,5.0,3.3))
# point lights inside core
for name,loc,col,energy in [("crystal blue light",center,(.03,.22,1),120),("crystal magenta light",center+Vector((.2,.05,.1)),(1,.01,.12),75)]:
    d=bpy.data.lights.new(name,'POINT'); d.energy=energy; d.color=col; d.shadow_soft_size=.3
    o=bpy.data.objects.new(name,d); bpy.context.collection.objects.link(o); o.location=loc

# -------------------------
# Camera and render
# -------------------------
bpy.ops.object.camera_add(location=(7.8,-10.8,5.5))
cam=bpy.context.object; cam.name="presentation camera"; cam.data.lens=52
look_at(cam,(0,1.75,2.45)); bpy.context.scene.camera=cam

scene=bpy.context.scene
scene.render.engine='BLENDER_EEVEE_NEXT'
scene.render.resolution_x=1536; scene.render.resolution_y=1536; scene.render.resolution_percentage=100
scene.render.image_settings.file_format='PNG'
scene.render.film_transparent=False
scene.world.color=(0.003,0.004,0.006)
scene.world.use_nodes=True
bg=scene.world.node_tree.nodes.get("Background"); bg.inputs["Color"].default_value=(0.002,0.003,0.005,1); bg.inputs["Strength"].default_value=.08
scene.view_settings.look='AgX - Medium High Contrast'
# compositor bloom
scene.use_nodes=True
nt=scene.node_tree; nt.nodes.clear()
rl=nt.nodes.new("CompositorNodeRLayers")
gl=nt.nodes.new("CompositorNodeGlare"); gl.glare_type='FOG_GLOW'; gl.quality='HIGH'; gl.threshold=.7; gl.size=7
comp=nt.nodes.new("CompositorNodeComposite")
nt.links.new(rl.outputs["Image"],gl.inputs["Image"]); nt.links.new(gl.outputs["Image"],comp.inputs["Image"])
# transparent settings helpful for GLB-compatible materials
scene.render.filepath="/tmp/reality_reprojection.png"
# save
bpy.ops.wm.save_as_mainfile(filepath="/tmp/reality_reprojection.blend")
```