"Sun Shots"
This project uses three.js. Make your choice and press reset. Or press play button and change settings.
- a source creates point
- the point move away from source
- intersections with ground or buildings are highlighted
This project uses three.js. Make your choice and press reset. Or press play button and change settings.
code
///////////////////////////////////
// ADD BUILDINGS ////////////
/* construct buildings */
var buildings = new THREE.Object3D();
/* building1 */
var mGeometry = new THREE.BoxGeometry( bWidth, bHeight, bDepth );
var mMaterial = new THREE.MeshLambertMaterial( { color: 0xffff00 } );
var building1 = new THREE.Mesh( mGeometry, mMaterial );
/* edges */
var mEdges = new THREE.EdgesGeometry( mGeometry );
var mLine = new THREE.LineSegments( mEdges, new THREE.LineBasicMaterial( { color: 0x0000ff } ) );
building1.add ( mLine );
/* change position */
building1.position.x = - bWidth * 2 ;
building1.position.y = bHeight / 2 ;
building1.position.z = bDepth * 3 ;
buildings.add ( building1 );
///////////////////////////////////
// SHADOWS //////////////////
/* 1. tell the renderer that you want shadows */
renderer.shadowMap.enabled = true;
renderer.shadowMap.type = THREE.PCFSoftShadowMap;
renderer.shadowMapSoft = true;
for (var i = 0; i < buildings.children.length; i++) {
/* 2. enable objects to cast shadows */
buildings.children[i].castShadow = true;
/* 3. enable objects to receive shadows */
buildings.children[i].receiveShadow = true;
}
/* 3. enable objects to receive shadows */
ground.receiveShadow = true;
/* 4. enable a light source to cast shadows (directional or spotlight only) */
light1 = new THREE.PointLight( 0xff0000, 1, 100 );
light1.position.set( sunSphere.position.x, sunSphere.position.y, sunSphere.position.z );
light1.castShadow = true;
scene.add( light1 );
///////////////////////////////////// INTERSECTIONS ///////////
var numPts = sunPoints.children.length;
/* move */
for (var i = 0; i < numPts; i++) {
sunPoints.children[i].translateX ( sunPoints.children[i].userData.direction.x * step )
sunPoints.children[i].translateY ( sunPoints.children[i].userData.direction.y * step )
sunPoints.children[i].translateZ ( sunPoints.children[i].userData.direction.z * step )
if (( getDistance( sunPoints.children[i], sunSphere ) > maxradius ) || ( sunPoints.children[i].position.y > sunSphere.position.y ) || ( sunPoints.children[i].position.y < (-2 * step) )) {
sunPoints.children[i].userData.delete = true;
} else {
var bounding_sp = new THREE.Box3().setFromObject(sunPoints.children[i]);
var ground_bounding = new THREE.Box3().setFromObject(ground);
var intersectGround = ground_bounding.intersectsBox(bounding_sp);
/* intersection of "sun points" with ground */
if ( intersectGround == true ){
sunPoints.children[i].userData.intersects = true;
} else {
/* intersection of "sun points" with buildings */
for (var j = 0; j < buildings.children.length; j++) {
var building_bounding = new THREE.Box3().setFromObject(buildings.children[j]);
var intersectBuilding = building_bounding.intersectsBox(bounding_sp);
if ( intersectBuilding == true ){
sunPoints.children[i].userData.intersects = true;
} else {
sunPoints.children[i].userData.delete = false;
}
}
}
}
}
Proceedings of the ALGOPLANA Conference 2025
Research-driven education (“Forschungsgeleitete Lehre“) is common throughout TU Wien, be it in the form of seminars, labs or lectures. ...
Algorithmic design of a Flagship Store
After successful completion of the course, students are able to understand the design process as a problem that can be split into solvable sub-problems. Furthermore, they are able to develop a solution strategy with the help of algorithms. The students acquire
in: 90 Jahre Pfarre Maria Lourdes (Festzeitschrift)
S. 13 - 16, Pfarrgemeinde Maria Lourdes (Hrsg.)
Die Maria Lourdes Kirche steht in der Tradition sakraler Gebäude, interpretiert deren Elemente aber neu. Dadurch erscheint sie als ein Bauwerk seiner Zeit. Sie zeigt neben modernen Umsetzungen von Symbolen, wie der sinnbildhaften Darstellung eines Kirchenjahrs mittels liturgischer Farben,. ...
in: 90 Jahre Pfarre Maria Lourdes (Festzeitschrift)
S. 13 - 16, Pfarrgemeinde Maria Lourdes (Hrsg.)
Da Gebäude stets in einem gesellschaftlichen und kulturellen Kontext ihres Entstehungsortes stehen, werden in diesem Artikel verschiedene Einflüsse speziell anhand der Maria Lourdes Kirche erörtert. Der Neubau der Pfarrkirche Maria Lourdes. ...
Urban Street Space Analysis with Spherical Box-Counting: Holistic digital Gestalt analysis of architecture in urban space
Talk and Proceeding: eCAADe 2024 – Data-Driven Intelligence (Nicosia, Cyprus | conference)
Spherical box-counting of urban street spaces is a novel method developed and refined by the authors to produce highly specific topological fractal fingerprinting of architecture in relation to observer position and in the context of the accompanying surroundings. ...
Visualizing Urban Transformations using a 3D Cellular Automaton
Talk and Proceeding: eCAADe 2024 – Data-Driven Intelligence (Nicosia, Cyprus | conference)
Urban transformation is key to achieving more livable and sustainable cities. However, modelling this evolution is highly non-trivial since there are many factors at play that manifest themselves in the built (or: non-built/restored) environment. In our most recent work, we have represented urban change as rules of a three-dimensional Cellular Automaton. ...