Sunbeams

This project uses three.js. Make your choice and press reset.

  • intersections between sunbeams and ground

code

///////////////////////////////////
// ADD BUILDING /////////////
  /* construct building */
  var building = new THREE.Object3D();
  for ( var i = 0; i < xSize; i++ ) {
    for ( var j = 0; j < ySize; j++ ) {
      for ( var k = 0; k < zSize; k++ ) {
        /* cube */
        var mGeometry = new THREE.BoxGeometry( boxSize, boxSize, boxSize );
        var mMaterial = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
        var cube = new THREE.Mesh( mGeometry, mMaterial );
        /* edges */
        var mEdges = new THREE.EdgesGeometry( mGeometry );
        var mLine = new THREE.LineSegments( mEdges, new THREE.LineBasicMaterial( { color: 0x0000ff } ) );
        cube.add ( mLine );
        //cube.userData = "isBuilding";
        /* change position */
        cube.position.x = ( i * boxSize ) - ((( xSize - 1 ) / 2 ) * boxSize );
        cube.position.z = ( j * boxSize ) - ((( ySize - 1 ) / 2 ) * boxSize );
        cube.position.y = ( k * boxSize ) + ( boxSize / 2 );
        building.add ( cube );
      }
    }
  }
  scene.add ( building );

///////////////////////////////////
// CALCULATE INTERSECTION
  /* midpoint of sun */
  var Sx = sphere.position.x
  var Sy = sphere.position.y
  var Sz = sphere.position.z
  /* the normal of the plane */
  var Ex = pNormal.x
  var Ey = pNormal.y
  var Ez = pNormal.z
  for (var i = 0; i < building.children.length; i++) {
    /* midpoint of cubes */
    var Mx = building.children[i].position.x
    var My = building.children[i].position.y
    var Mz = building.children[i].position.z
    /* line: Sx + (Mx -Sx) * t; Sy + (My -Sy) * t; Sz + (Mz -Sz) * t;
       plane: normal and pt (0,0,0) */
    var t = ( - Ex * Sx - Ey * Sy - Ez * Sz ) / (Ex * Mx - Ex * Sx + Ey * My - Ey * Sy + Ez * Mz - Ez * Sz )
    var ptX = Sx + ( Mx - Sx ) * t
    var ptY = Sy + ( My - Sy ) * t
    var ptZ = Sz + ( Mz - Sz ) * t
    /* intersection point as sphere */
    var iGeometry = new THREE.SphereGeometry( boxSize, 16, 16 );
    var iMaterial = new THREE.MeshBasicMaterial( {color: 0x0fff00} );
    var intersPt = new THREE.Mesh( iGeometry, iMaterial );
    /* change position */
    intersPt.position.x = ptX;
    intersPt.position.y = ptY;
    intersPt.position.z = ptZ;
    scene.add( intersPt );

    /* show sunlines */
    var midPointSphere = sphere.position
    var midPointMesh = intersPt.position
    var dirGeometry = new THREE.Geometry();
    dirGeometry.vertices.push( midPointSphere, midPointMesh );
    var dirMaterial = new THREE.LineBasicMaterial({ color: 0x0f00ff });
    var dirLine  = new THREE.Line( dirGeometry, dirMaterial );
    scene.add( dirLine );
    if (program.get('showSunLines') == true) {
      dirLine.visible = true
    } else {
      dirLine.visible = false
    }
  }

eCAADe 2026:
Multi-Layered Gestalt Analysis of Irregular Shapes in Architecture

Gradient Analysis and Box-Counting Applied to Amorphous Designs
Talk and Proceeding: eCAADe 2026 – Informed creativity in architecture and engineering (Lübeck, Germany | conference)

This paper presents the new and enhanced version of the gradient analysis to be added to the digital toolbox of Gestalt evaluation of irregular shapes. This allows for a multi-perspective approach to Gestalt analysis of irregular shapes in architecture from now on. ...

eCAADe 2026:
ProceeDings 2.0

A web-based application for editing and layout of conference papers
Talk and Proceeding: eCAADe 2026 – Informed creativity in architecture and engineering (Lübeck, Germany | conference)

Writing academic papers is challenging, and formatting them can be even more time-consuming. Over time, the demands for multi-stage submission and review processes have gradually increased. At the same time, the number of submissions and published conference papers has steadily grown. ...

Mass Customization and Individualized Production

A Companion Textbook

The concept of mass customization has already found its way into architecture. But where does the term come from, what are the basic requirements, and what are the challenges, especially in architecture? ...

AlgoPlana 2026

Proceedings of the ALGOPLANA Conference 2026

The students‘ conference “Algorithms in Planning Practice 2026” is the result of a seminar held at the Research Unit Digital Architecture and Planning at the TU Wien in the summer semester 2026. ...

Urban Transformation Between Built and NaturalSystems by Means of an Adapted Wave FunctionCollapse Approach

Journal Paper In JoDLA –  Journal of Digital Landscape Architecture (e-ISSN 2511-624X)

In practice, urban transformation is often carried out at the outskirts or in between existing areas of a city. In that context, important questions are: How can one imagine a transition between different urban structures? ...

Urban Data

Presentation: at the School of Environment and Society, Institute of Science Tokyo, Japan

This presentation explores how municipal data provided by the City of Vienna can be used to support urban analysis, planning, and decision-making. ...