<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Declarative Computing with Shapes and Shadows</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Carl SCHULTZ</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mehul BHATT</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Cognitive Systems (CoSy) University of Bremen</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <fpage>143</fpage>
      <lpage>150</lpage>
      <abstract>
        <p>We present a preliminary concept and a prototypical implementation of a declarative computing framework that is capable of reasoning about 3D physical entities, and the shadows that they cast in open or uniformly lit environments. For this paper, we restrict our scope of 'uniform lighting' to sunlight, and its incidence on a given geospatially and temporally referenced location. The model extends traditional techniques from computational geometry and computer graphics that are primarily motivated by simulation or visualisation. In particular, our declarative framework is capable of deriving and reasoning about the objects and their cast shadows in a knowledge processing sense, e.g., involving qualitative abstraction and semantic specification of requirements, query capability, ensuring conceptual consistency of design requirements. Our ontology of objects and shadows, and the resulting computational framework serves as a foundational engine for high-level conceptual (spatial) design assistance technology. The capabilities demonstrated in this paper are aimed at applications in spatial design, chiefly encompassing Computer-Aided Architecture Design (CAAD), Urban Planning, and Interior Design.</p>
      </abstract>
      <kwd-group>
        <kwd />
        <kwd>declarative languages</kwd>
        <kwd>knowledge representation and reasoning</kwd>
        <kwd>geometric and spatial representation and reasoning</kwd>
        <kwd>computational geometry</kwd>
        <kwd>shadows</kwd>
        <kwd>CAAD</kwd>
        <kwd>design</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>The way in which direct sunlight falls on surfaces in the built environment has a
tremendous impact on its atmosphere, character, and affordances. Consider the role of sunlight
in fostering a golden autumnal scene, the mood established by acutely angled sun rays
in the early morning, or headache-inducing glare in a work place.</p>
      <p>The absence of direct sunlight is shadow. Shadows and sunlight partition empty space;
they are not objects in the sense of having a material extension in the way that walls,
doors, and other physical objects do. Yet architects are centrally concerned with the play
between shadows and sunlight, and reason about the physical geometric forms and
arrangements of shadows and sunlight, for example, to achieve a visual balance, to focus
or accentuate aspects of the design, or to create a visual flow through a hierarchy of
illumination.</p>
      <p>Questions surrounding the behaviour of sunlight come to the fore in urban-scale designs.
Architects need to determine how the orientation, shape, and positioning of buildings and
large environment features influence the geometric forms of shadows. How can we
manipulate the objects in the environment to achieve a desired atmosphere through shadows
and sunlight? Would it be possible to manipulate shadows directly in our design?
Various numerical techniques have been developed for computing the effects of lighting
in an environment. One method is detailed ray tracing where a large number of
simulation rays are emitted from the light source and reflected from intercepting surfaces.1
While being very accurate and precise, there are significant limitations with these
detailed numerical approaches.</p>
      <p>Firstly, they require an enormous amount of computational resources, and may take hours
or even days to produce a lighting model for large-scale urban designs. This makes it
infeasible to repeatedly re-run the simulation after making minor changes to the design.
Secondly, the results do not emphasise the essential form of shadows as objects. For
example, they may produce a complex point cloud of luminance values that requires yet
further complex calculations to answer basic questions about sunlight and shadow. By
applying a uniformly high degree of numerical precision to every aspect of the building
design, these methods hide those critical qualitative aspects of the design that play the
most important role in natural lighting.</p>
      <p>Thirdly, these methods require a detailed numerical building design before the lighting
model can be generated. But very often, particularly in the early stages of a design, many
numerical details are simply not available, such as the exact lengths of certain walls or
the precise orientation of certain buildings.</p>
      <p>We present a qualitative approach for generating shadows and sunlight regions as
firstclass objects using appropriate abstractions of building information models and natural
lighting. Our objective is to extend and enrich standing design information models with
different types of natural lighting space. We accomplish this within the paradigm of
constraint logic programming so as to support declarative queries and high-level analysis
about sunlight and shadows.</p>
    </sec>
    <sec id="sec-2">
      <title>2. The Shape of Shadows</title>
      <p>
        Seen as mathematical objects, shadows are a product of the interaction between opaque
geometric forms and light. The placing and orienting of walls and windows is sculpting
the forms of shadows and sunlight, and thus shaping yet another layer of experience from
the environment, beyond the material objects and the perceived e
        <xref ref-type="bibr" rid="ref3">mpty space [Bhatt et al.,
2012</xref>
        ]. Figure 1 comparatively illustrates these three layers of a scene.
      </p>
      <p>1Each ray might have a maximum number of allowable reflections before the simulation of the ray is
terminated. Properties of the ray are recorded, such as the complete path or just the intersection points, and this data
is used to generate a detailed surface lighting model.</p>
      <sec id="sec-2-1">
        <title>2.1. Spatial Patterns and the Subjective Experience</title>
        <p>
          Within each layer the designer can specify spatial patterns that they deem to evoke salient
user experiences or induce certain behaviours. Consider the following brief extracts from
Seidler’s opening statements about the role of sunlight and shadow in arc
          <xref ref-type="bibr" rid="ref6">hitecture
[Seidler, 1959</xref>
          ]:
“Solid form is accentuated and added to by the shadow it casts which recalls design
form.”
“Spidery elements, adjuncts to buildings and sculpture increase the interest of their
own forms by the complex pattern of their shadows which must be considered as an
integral part of the elements that cast them.”
“The oscillation between light and shade gives richness to building in contrast [..]”
In these excerpts the architect identifies a number of relationships: shadows accentuate
the experience of material forms; complex patterns of shadow increase interest in
architectural forms; oscillation patterns add richness to the experience of the environment.
For example, a small patch of sunlight can be accentuated by a much larger region of
surrounding shadow. Such a pattern may function as a visual attractor for user
wayfinding, and the visual emphasis and focus may provide a heightened sense of excitment and
drama. We argue that these patterns are qualitative, rather than metric, in nature, and that
they can be successfully formalised within first-order logic expressions over semantically
rich building information models.
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. The dynamic nature of shadows and sunlight</title>
        <p>There is an inherent dynamism in the nature of sunlight that operates at numerous levels.
The location of the sun in relation to the environment clearly has an immediate impact on
the forms of shadows. Although this relationship is constantly changing throughout the
day, the induced patterns of sunlight and shadow can appear fixed at a given moment,
especially at an urban scale. Thus, an environment can exhibit distinct visual states from
sunlight at various times of the day.</p>
        <p>The seasonal variations of the sun’s trajectory across the sky also has a clear impact
in many countries: the low arc of the sun’s path during winter can cast long shadows
throughout a day and may leave some parts of the environment without any direct
sunlight for months.2
This dynamism gives rise to two basic questions: what are the shapes of shadows and
sunlight at a given moment, and what are those shapes across periods of time? For
example, the designer may need to know whether a given room ever has direct sunlight
during the day, or whether a certain cafe zone has direct sunlight at each midday period
throughout the year.</p>
        <p>Computationally answering each one of these questions requires the capability to
handle conceptual, spatial, and temporal concepts in an expressive knowledge processing
and inferencing environment. From an application viewpoint, this is the objective of the
ongoin work reported in this paper.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. A Qualitative Model of Sunlight and Shadows</title>
      <p>In this section we describe the abstractions of our sun model. Our model provides the
necessary information for determining the regions of space covered in shadow, it is
flexible enough to work with both highly under-specified early designs and detailed
numerical designs, and generates shadows in real-time. Thus, our model allows the designer to
quickly experiment with a large number of designs to determine how shadows broadly
behave.</p>
      <p>
        In this model we focus explicitly on direct sunlight
        <xref ref-type="bibr" rid="ref5">(and ignore ambient illumination
[Schultz et al., 2009])</xref>
        , i.e. regions of space in which there is an uninterrupted straight
line from the sun to every point in the region; shadows are the absence of direct sunlight.
      </p>
      <sec id="sec-3-1">
        <title>3.1. Modelling Outdoor Sunlight</title>
        <p>When modelling sunlight on an urban scale we only take large objects into account such
as buildings, large trees, and billboards.3 We use a highly abstracted model of buildings
to determine how they cast outdoor shadows: while buildings can consist of thousands of
objects, the single most informative features are the geometries, elevations, and heights
of slabs (i.e. rooves and floors).</p>
        <p>Shadows are generated from slabs by making the qualitative generalisation that walls
and other objects holding up slabs are effectively opaque. This provides a rapid
approximation of the building envelope. Other large outdoor objects are modelled using very
abstract geometries such as bounding boxes. Thus, the designer only needs to provide a
very rough outline of buildings and amenities to begin experimenting with shadows.</p>
        <p>2The interference of other objects such as clouds can also influence the form of shadows, but these external
conditions are not relevant for our qualitative model.</p>
        <p>3Modelling the shadows of an outdoor park bench is too fine-grained and will not contribute to an
understanding of how shadows influence and shape the environment on a large scale.
(a) Sun modelled as a point
source and placed on a
celestial sphere. The sun traces a path
around the building design.</p>
        <p>(b) Buildings abstracted using
slabs.</p>
        <p>(c) Slabs projected
“stretched” based on
location of the sun.</p>
        <p>and
the
(d) 3D shadow volumes.</p>
        <p>(e) 2D shadow footprints.</p>
        <p>
          As is typical for planetary
          <xref ref-type="bibr" rid="ref4">models [Roderick, 1992</xref>
          ], we model the sun as a point source
placed on a celestial sphere centred on the design. The sun is positioned using altitude
and azimuth angles.4 We generate a model of shadows by “stretching” each vertex of
each slab polygon according to the elevation and height of the slab, and location of the
sun. This results in 2D shadow footprints (useful for top-down plan analysis) and 3D
shadow volumes. The process is illustrated in Figure 2.
        </p>
        <p>If the sun’s altitude is within a certain range then indoor direct sunlight can be
approximated using the isovist of a point derived from the sun’s location,5 as illustrate in Figure
3. This abstracts from the height information of the windows, and other precise design
parameters, to provide the designer with information on the rooms that are exposed to
direct sunlight.</p>
        <p>4Standard formulae for converting latitude, longitude, calendar date, and time of day into approximate sun
coordinates are usable; for details, refer to [Ast, 1996] page C24.</p>
        <p>5More specifically, the sun point is projected onto a plane that is parallel to the ground and set to the elevation
of the relevant building floor. The isovist is then taken from this projected point in that plane.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Declarative High-level Design Specifications for Shadows</title>
      <p>
        In this section we present an assortment of declarative programming logic specifications
in the domain of urban and indoor design for art galleries, academic sites, and other
public spaces. These example rules are processed using our general purpose spatial
reasoning fra
        <xref ref-type="bibr" rid="ref2">mework CLP(QS) [Bhatt et al., 2011</xref>
        ]; CLP(QS) provides domain-independent
geometric and qualitative spatial and temporal reasoning functionality within a Constrain
Logic Programming (CLP) setting .
      </p>
      <p>Sunlight and Shadow predicates. The location of the sun is defined by altitude and
azimuth, which in turn can be computed from a calendar date and time. We can determine
the sun location based on a given time, or the time that corresponds to a given location,
by using the predicate:</p>
      <p>sun(DateTime, Azi, Alt).</p>
      <p>Painting damage. There may be a risk that paintings are damaged if they are exposed
to direct sunlight. This occurs if there is some period in which the sunlight overlaps the
painting.</p>
      <p>riskOfSunDamage(Painting)
:physical space(Painting, ,PPolygon),
sunlight(sun(DateTime, , ), ,SPolygon),
topology(SPolygon,PPolygon,overlaps).
sunRoom(Room)
:movement space( ,Room,MPolygon),
winter(DateTime),
sunlight(sun(DateTime, , ), ,SPolygon),
topology(SPolygon,MPolygon,overlaps).</p>
      <p>Rooms with sunlight. We can determine whether particular rooms in our design get
direct sunlight during winter.</p>
      <sec id="sec-4-1">
        <title>Summer</title>
      </sec>
      <sec id="sec-4-2">
        <title>Winter</title>
        <p>Uncomfortable cafe garden. At around midday throughout the year, the area where
people relax and enjoy lunch should not be completely covered in shadow.
uncomfortableCafeArea(CafeOutdoorArea)
:movement space(CafeOutdoorArea, ,MPolygon),
midday(DateTime),
shadow(sun(DateTime, , ), ,SPolygon),
topology(SPolygon,MPolygon,contains).</p>
        <p>Shadow forms across periods of time. The dynamism of shadows as a product of the
changing relationship between environment and sun results in patterns and forms that
can be captured and analysed. For example, as in the uncomfortable cafe example, the
architect may need to study the topology of regions that are always in shadow over a
period of time.
by the surrounding colder shadowed regions, and thus could be utilised as an area for
outdoor winter activities such as winter markets, events, or a shared cafe area.
The periods of time do not need to be temporally contiguous. Figure 5 shows the areas
of sunlight and shadow from every morning and evening throughout the entire year.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Discussion and Future work</title>
      <p>In our current prototypical implementation, we compute dynamic forms of sunlight and
shadow regions by sampling sun locations within the specified period, generating the
sunlight or shadow regions for each sample, and combining the results. One future
research aim is to fully encode the relationship between calendar date, sun location, and
sunlight and shadow regions within the framework of Constraint Logic Programming.
Furthermore, based on our preliminary foundations in [Schultz et al., 2009], we are also
investigating the incorporation of non-uniformly lit ambient lighting conditions, which
are more suited for interior design scenarios, and in cases where the internal composure
of a building is controlled via artificial light sources.</p>
      <p>This leads into the next core future research aim of generating metric instantiations from
qualitative (spatial) relational specifications – that is, automatically adjusting designs in
order to satisfy certain high-level qualitative properties. Given certain shadow
properties that must be satisfied in the design such as “the painting must not be exposed to
direct sunlight”, our reasoning system (i.e., underlying constraint solver) will find
solutions by rotating and translating the objects on the ground-plane in a manner that the
derived transformation satisfies the desired topological relationships between the physical
entities and their cast shadows.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <article-title>The Astronomical Almanac For the Year 1996</article-title>
          . Nautical Almanac Office,
          <source>United States Naval Observatory and Her Majesty's Nautical Almanac Office</source>
          ,
          <year>1996</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <given-names>M.</given-names>
            <surname>Bhatt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. H.</given-names>
            <surname>Lee</surname>
          </string-name>
          , and
          <string-name>
            <surname>C. Schultz.</surname>
          </string-name>
          <article-title>CLP(QS): A Declarative Spatial Reasoning Framework</article-title>
          . In COSIT, pages
          <fpage>210</fpage>
          -
          <lpage>230</lpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <given-names>M.</given-names>
            <surname>Bhatt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Schultz</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Huang</surname>
          </string-name>
          .
          <article-title>The Shape of Empty Space: Human-centred Cognitive Foundations in Computing for Spatial Design</article-title>
          .
          <source>In IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC)</source>
          , pages
          <fpage>33</fpage>
          -
          <lpage>40</lpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <given-names>M. L.</given-names>
            <surname>Roderick</surname>
          </string-name>
          .
          <article-title>Methods for calculating solar position and day length including computer programs and subroutines</article-title>
          .
          <source>Land Management</source>
          , Western Australian Department of Agriculture,
          <year>1992</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <surname>C. P. L. Schultz</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Amor</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Lobb</surname>
            , and
            <given-names>H. W.</given-names>
          </string-name>
          <string-name>
            <surname>Guesgen</surname>
          </string-name>
          .
          <article-title>Qualitative design support for engineering and architecture</article-title>
          .
          <source>Advanced Engineering Informatics</source>
          ,
          <volume>23</volume>
          :
          <fpage>68</fpage>
          -
          <lpage>80</lpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <given-names>H.</given-names>
            <surname>Seidler</surname>
          </string-name>
          .
          <article-title>Sunlight and architecture</article-title>
          .
          <source>Architectural Science Review</source>
          ,
          <volume>2</volume>
          ,
          <year>1959</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>