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

# Clear the default scene
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete(use_global=False)
for datablocks in (bpy.data.meshes, bpy.data.curves, bpy.data.materials,
                   bpy.data.cameras, bpy.data.lights):
    pass

# -------------------------------------------------------------------
# Materials
# -------------------------------------------------------------------
def make_principled_material(name, base_color, roughness, metallic=0.0, specular=0.5):
    mat = bpy.data.materials.new(name)
    mat.use_nodes = True
    bsdf = mat.node_tree.nodes.get("Principled BSDF")
    bsdf.inputs["Base Color"].default_value = (*base_color, 1.0)
    bsdf.inputs["Roughness"].default_value = roughness
    bsdf.inputs["Metallic"].default_value = metallic

    if "Specular IOR Level" in bsdf.inputs:
        bsdf.inputs["Specular IOR Level"].default_value = specular
    elif "Specular" in bsdf.inputs:
        bsdf.inputs["Specular"].default_value = specular

    return mat

red_material = make_principled_material(
    "Plain Glossy Red",
    (0.72, 0.008, 0.006),
    roughness=0.2,
    specular=0.52
)

white_material = make_principled_material(
    "Plain White Ground",
    (0.82, 0.82, 0.82),
    roughness=0.38,
    specular=0.28
)

# -------------------------------------------------------------------
# Ground plane: exactly z = 0
# -------------------------------------------------------------------
bpy.ops.mesh.primitive_plane_add(size=30.0, location=(0.0, 0.0, 0.0))
ground = bpy.context.object
ground.name = "White Ground Plane"
ground.data.materials.append(white_material)

# -------------------------------------------------------------------
# Sphere: diameter exactly 1 m, resting exactly on the plane
# -------------------------------------------------------------------
bpy.ops.mesh.primitive_uv_sphere_add(
    segments=128,
    ring_count=64,
    radius=0.5,
    location=(0.0, 0.0, 0.5)
)
sphere = bpy.context.object
sphere.name = "Red Sphere - 1m Diameter"
sphere.data.materials.append(red_material)

# Explicitly ensure smooth shading on every polygon
for poly in sphere.data.polygons:
    poly.use_smooth = True

# Keep the dimensions mathematically exact
sphere.dimensions = (1.0, 1.0, 1.0)
sphere.location = (0.0, 0.0, 0.5)
bpy.context.view_layer.objects.active = sphere
sphere.select_set(True)
bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)

# -------------------------------------------------------------------
# Lighting: large soft key plus restrained ambient fill
# -------------------------------------------------------------------
world = bpy.data.worlds.new("Soft Neutral World")
bpy.context.scene.world = world
world.use_nodes = True
world_bg = world.node_tree.nodes.get("Background")
world_bg.inputs["Color"].default_value = (0.055, 0.055, 0.055, 1.0)
world_bg.inputs["Strength"].default_value = 0.18

# Broad area light gives a soft, readable contact shadow
light_data = bpy.data.lights.new("Large Softbox", type='AREA')
light_data.energy = 520.0
light_data.shape = 'DISK'
light_data.size = 4.0
light_data.color = (1.0, 0.91, 0.84)
key = bpy.data.objects.new("Large Softbox", light_data)
bpy.context.collection.objects.link(key)
key.location = (-3.8, -4.5, 5.5)

# Aim the light toward the sphere
light_target = Vector((0.0, 0.0, 0.35))
key.rotation_euler = (light_target - key.location).to_track_quat('-Z', 'Y').to_euler()

# Very gentle cool fill, preventing the unlit side from going completely black
fill_data = bpy.data.lights.new("Soft Fill", type='AREA')
fill_data.energy = 55.0
fill_data.shape = 'DISK'
fill_data.size = 5.0
fill_data.color = (0.72, 0.82, 1.0)
fill = bpy.data.objects.new("Soft Fill", fill_data)
bpy.context.collection.objects.link(fill)
fill.location = (4.0, 2.5, 3.5)
fill.rotation_euler = (light_target - fill.location).to_track_quat('-Z', 'Y').to_euler()

# -------------------------------------------------------------------
# Camera: clean square product-style framing
# -------------------------------------------------------------------
camera_data = bpy.data.cameras.new("Presentation Camera")
camera = bpy.data.objects.new("Presentation Camera", camera_data)
bpy.context.collection.objects.link(camera)
bpy.context.scene.camera = camera

camera.location = (3.35, -6.2, 2.65)
camera_target = Vector((0.0, 0.0, 0.48))
camera.rotation_euler = (camera_target - camera.location).to_track_quat('-Z', 'Y').to_euler()
camera_data.lens = 58.0
camera_data.sensor_width = 36.0
camera_data.clip_start = 0.01
camera_data.clip_end = 100.0

# -------------------------------------------------------------------
# Render settings
# -------------------------------------------------------------------
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

# High-quality preview settings; benchmark may override these to Cycles
scene.render.image_settings.color_mode = 'RGBA'
try:
    scene.view_settings.look = 'AgX - Medium High Contrast'
except Exception:
    try:
        scene.view_settings.look = 'Medium High Contrast'
    except Exception:
        pass
scene.view_settings.exposure = 0.0
scene.view_settings.gamma = 1.0

# Ambient occlusion improves the visible contact region in interactive previews
scene.world.color = (0.05, 0.05, 0.05)

# Organize objects
ground.select_set(False)
sphere.select_set(False)
key.select_set(False)
fill.select_set(False)
camera.select_set(False)

# Save the complete Blender scene
bpy.ops.wm.save_as_mainfile(filepath="/tmp/red_sphere_ground.blend")
```