<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
 	<channel>
		<title>New projects | PLaSM | Alberto Paoluzzi</title>
		<link>http://www.dia.uniroma3.it/~paoluzzi/plasm502/gallery/complex_projects/</link>
		<description></description>
		<language>en</language>
		<lastBuildDate>Sun, 14 Feb 2010 05:26:45 +0100</lastBuildDate>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<generator>Sandvox Pro 1.6.6 (12244)</generator>
		<item>
			<title>Logistic district</title>
			<link>http://www.dia.uniroma3.it/~paoluzzi/plasm502/gallery/complex_projects/logistic_district/</link>
			<description>
				&lt;div class="article-thumbnail"&gt;
					&lt;img
						src="http://www.dia.uniroma3.it/~paoluzzi/plasm502/_Media/logistic-2.jpeg"
						alt="Logistic district"
						width="128"
						height="94" /&gt;
				&lt;/div&gt;
&lt;div&gt;&lt;p&gt; &lt;span style=&quot;font-size: 18px; text-align: center;&quot;&gt;Model of a commercial district&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;p&gt;In this section we discuss the development of some parameterized symbolic models of virtual warehousing buildings, that could be used by a security enforcement system to model the protection and the security of a logistics company. Our modeling design will be based on the elementary standardized items of such kind of building trade, i.e.~on the models of the pallet and of the storage rack.&lt;/p&gt;
&lt;h3&gt;Modular warehouse elements&lt;/h3&gt;
&lt;p&gt;In Listing 1 is given the PLaSM coding of the &lt;em&gt;EUR-Epal&lt;/em&gt; pallet
specification, shown in Figure 6a. Each layer is generated by
Cartesian product of three 1D polyhedral complexes. The four
wooden layers are stacked by the TOP operator, and finally the
solid angles are subtracted to the model, named europallet.
The single angle is generated by extrusion (Cartesian product by
the 1D segment q:1.66) of the properly-scaled standard triangle
simplex:2 of unit size.&lt;/p&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF europallet =
        (layer4 TOP layer3 TOP layer2 TOP layer1) - angles
WHERE
        dy = (0.800 - 0.145*3 - 0.100*2)/4,
        layer1 = q:1.2 * q:&amp;lt;0.145,-:dy,0.1,-:dy,0.145,-:dy,0.1,-:dy,0.145&amp;gt; * q:0.022,
        layer2 = q:&amp;lt;0.145,-0.382,0.145,-0.382,0.145&amp;gt; * q:0.8 * q:0.022,
        layer3 = q:&amp;lt;0.145,-0.382,0.145,-0.382,0.145&amp;gt; * q:&amp;lt;0.1,-:(dy+0.045),-0.1,-:dy,0.145,-:dy,-0.1,-:(dy+0.045),0.1&amp;gt; * q:0.1,
        layer4 = q:1.2 * q:&amp;lt;0.1,-:(dy+0.045),-0.1,-:dy,0.145,-:dy,-0.1,-:(dy+0.045),0.1&amp;gt; * q:0.022,
        angle = S:&amp;lt;1,2&amp;gt;:&amp;lt;0.022,0.022&amp;gt;:(simplex:2) * q:1.66,
        angles = STRUCT:&amp;lt; angle,T:1:1.2 ~ S:1:-1,angle,T:2:0.8 ~ S:2:-1,angle,S:1:-1~T:1:-1.2,angle  &amp;gt;
END;
VIEW:europallet;&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;title&quot;&gt;Europallet model&lt;/div&gt;
&lt;p&gt;&lt;span class=&quot;image&quot;&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;A deposit of pallets is generated by the code in Listing 2 and displayed in Figure 6c. The palletpile function concatenates n instances of the pair &amp;lt;europalette,T:3:0.166&amp;gt;, where T:3:0.166 is a z -translation of 0.166 meters, and assembles the pile according to the semantics of the PHIGS structures [iso/iec 9592-1 1989]. The europalette symbol contains a geometric value obtained by europallet by exchanging the x and y coordinates, according to the semantics of the MAP operator.&lt;/p&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF palletpile(n::isintpos) =
        (STRUCT~##:n):&amp;lt;europalette,T:3:0.166&amp;gt;
WHERE
        europalette = MAP:[s2,s1,s3]:europallet
END;
DEF palletwall(n,m::isintpos) =
        (STRUCT~##:m):&amp;lt;palletpile:n,T:1:0.8&amp;gt;;
VIEW:(palletwall:&amp;lt;30,12&amp;gt;);&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;title&quot;&gt;Palletwall instance&lt;/div&gt;
&lt;p&gt;In Listing 3 we show the definition of a warehouse rack parameterized with respect to the number nn of floors, the number m of piles, the height, width, and depth of the single floor, and even to the geometry of the stored warehouse. The frame module is a structure of four column at the angles of the rack element, named theframe, which also contains two horizzontal elements hsupport and two pairs of diagonal elements dsupport1 and dsupport2. It may be useful to notice that dsupport2 is generated by applying a suitable vertex MAP to dsupport1, that reverses the sign of the x coordinates, and applies a linear map $y \mapsto depth •y$ to the y coordinates, while leaving the z coordinates invariant.&lt;/p&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF warehouse_rack (nn,m::isintpos)(height,width,depth::isrealpos) (loading::ispol) =
        (STRUCT~##:m):&amp;lt; pile,T:1:(width+0.2)&amp;gt;
WHERE
        frame_module = STRUCT:&amp;lt; column,T:2:depth,column,T:1:width,column,T:2:(-:depth),column &amp;gt;,
        column = cylinder:&amp;lt;0.02,height&amp;gt;:12,
        hsupport = STRUCT:&amp;lt;T:1:-0.02,cuboid:&amp;lt;0.04,depth,0.02&amp;gt;&amp;gt;,
        dsupport1 = (R:&amp;lt;2,3&amp;gt;:(atan:(height/depth))~CUBOID):&amp;lt;0.01,SQRT:(height**2+depth**2),0.02&amp;gt;,
        dsupport2 = MAP:[-~S1,K:depth - S2,S3]:dsupport1,
        beams = q:width * (q~#:nbeams):0.1 * q:&amp;lt;-0.02,0.1&amp;gt; TOP loading,
        nbeams = FLOOR:(depth/0.1),
        theframe = STRUCT:&amp;lt;beams,frame_module ,dsupport1,dsupport2,hsupport,T:1:width,hsupport,dsupport1,dsupport2&amp;gt;,
        pile = (STRUCT~##:nn):&amp;lt;theframe,T:3:height&amp;gt; TOP top_pile,
        top_pile = STRUCT:&amp;lt;beams,hsupport,T:1:width,hsupport &amp;gt;
END;&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In Listing 4 we show a possible definition for the loading of
the warehouse rack, in this case given as a double pair, in turn
assembled as a carton and an europallet oriented with the
main axis along the y direction. The loading value defined here
is the one used in Figures 7a and 7b.&lt;/p&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF loading = STRUCT:&amp;lt; pair,T:1:1.2, pair &amp;gt;
WHERE
        pair = MAP:[s2,s1,s3]:europallet TOP carton,
        carton = CUBOID:&amp;lt;0.7,1.2,1.2&amp;gt;
END;
VIEW:(pallet_rack:&amp;lt;6,8&amp;gt;:&amp;lt;1.8,2.5,1.5&amp;gt;: loading);&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The model shown in Figure 7c is generated by the PLaSM code in Listing 5. The warehouse function has the same interface than the warehouse rack function, but without the formal parameter loading of polyhedral type. The reader may see that the argument expression of the VIEW primitive is used to generate three warehouse instances with different actual parameter values, and to locate the 1st and 3rd instances below and on the left of the 2nd one, respectively. The reader should understand that a multiple infix expression like exp1 OP1 exp2 OP2 ex3 is evaluated from left-toright as ((exp1 OP1 exp2 ) OP2 ex3 ).&lt;/p&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;%DEF warehouse (nn,m::isintpos)
        (height,width,depth::isrealpos) = .... ;
VIEW:(warehouse:&amp;lt;3,4&amp;gt;:&amp;lt;1.8,2.5,1.5&amp;gt; STRUCT
        T:3:(1.8*3):(warehouse:&amp;lt;1,4&amp;gt;:&amp;lt;1.8,2.5,1.0&amp;gt;)
        LEFT T:1:0.2:(warehouse:&amp;lt;4,3&amp;gt;:&amp;lt;1.8,2,1.0&amp;gt;) );%&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;Warehouse buildings&lt;/h3&gt;
&lt;p&gt;In order to generate some nice models of very different warehouse
buildings, we start by preparing a small geometric library, allowing
for both realistic and fancy construction models. We have a double
aim: (a) to generate some complex models by writing an extremely
compact PLaSM code; (b) to show the amazing descriptive power
of the language. In particular, we proceed in the following way.
First, we generate three Coons' surfaces S, S, S: [0, 1]^2
\rightarrow E^3.&lt;/p&gt;
&lt;p&gt;Then we linearly combine such surfaces pairwise, to generate two
volume maps V0, V1: [0, 1]^3 \rightarrow E^3
that we will use to produce the columns and the beams, respectively, according
to different engineering schemes for the resistant structure. Let us notice that
a CoonsPatch is a surface generated by transfinite interpolation of 4 boundary
curves u0,u1,v0,v1. Bezier is the PLaSM naming of the transfinite and
multivariate B •ezier library function (see, e.g. [Paoluzzi 2003]). The physical
dimensions of the building are defined by the parameters w,d,h of the surface
function, which stand for width, depth, and height (in meters), respectively.
The further parameters uw,ud,uh and vw,vd,vh are used to variate the geometry of
the beams and the roof in the u, v directions of the domain space, and are all
zero in the building of Figure 9a.&lt;/p&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF surface(w,d,h::isreal)(uw,ud,uh::isreal)
        (vw,vd,vh::isreal) = CoonsPatch:&amp;lt;u0,u1,v0,v1&amp;gt;
WHERE
        u0 = bezier:s1:&amp;lt;&amp;lt;0,0,h&amp;gt;,&amp;lt;w/3,0,h+uh&amp;gt;,&amp;lt;2*w/3,0,h+uh&amp;gt;,&amp;lt;w,0,h&amp;gt;&amp;gt;,
        u1 = bezier:s1:&amp;lt;&amp;lt;0,d,h&amp;gt;,&amp;lt;w/3,d,h+uh&amp;gt;,&amp;lt;2*w/3,d,h+uh&amp;gt;,&amp;lt;w,d,h&amp;gt;&amp;gt;,
        v0 = bezier:s1:&amp;lt;&amp;lt;0,0,h&amp;gt;,&amp;lt;0,d/3,h+vh&amp;gt;,&amp;lt;0,2*d/3,h+vh&amp;gt;,&amp;lt;0,d,h&amp;gt;&amp;gt; (AA:COMP~DISTR) [S2],
        v1 = bezier:s1:&amp;lt;&amp;lt;w,0,h&amp;gt;,&amp;lt;w,d/3,h+vh&amp;gt;,&amp;lt;w,2*d/3,h+vh&amp;gt;,&amp;lt;w,d,h&amp;gt;&amp;gt; (AA:COMP~DISTR) [S2]
END;
DEF S_0 = surface:&amp;lt;40,16,0&amp;gt;:&amp;lt;0,0,0&amp;gt;:&amp;lt;0,0,0&amp;gt;;
DEF S_1 = surface:&amp;lt;40,16,10&amp;gt;:&amp;lt;0,0,-1&amp;gt;:&amp;lt;0,0,1.0&amp;gt;;
DEF S_2 = surface:&amp;lt;40,16,12&amp;gt;:&amp;lt;0,0,-2&amp;gt;:&amp;lt;0,0,2.0&amp;gt;;
DEF V0 = bezier:s3:&amp;lt; S_0, S_1 &amp;gt;;
DEF V1 = bezier:s3:&amp;lt; S_1, S_2 &amp;gt;;&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The actual building shape is defined by suitably setting some subsets of the
domain &lt;sup style=&quot;font-size: 10px;&quot;&gt;3 of the volume maps V0 , V1 to accomodate the various building
fabric subsystems, i.e. columns, beams, roofs, enclosure1 and enclosure2, each
one defined as a Cartesian product of three 1D (set of) intervals. The resulting
building as a set of E3 points is just a STRUCT aggregation of the MAPped
subdomains of [0, 1]&lt;/sup&gt;3 . Figure 9 shows some examples.&lt;/p&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF dom (n::isint; m::isrealpos) =
        ##:(n - 1):&amp;lt;full,-:empty&amp;gt; AR full
WHERE
        full = m/n, empty = (1- full*n)/(n - 1)
END;
DEF pattern = dom:&amp;lt;12,0.10&amp;gt;;
DEF columns = q:pattern * q:&amp;lt;0.05,-0.9,0.05&amp;gt;* q:1;
DEF beams = q:pattern * q:(#:20:0.05) * q:1;
DEF roofs = (q ~ aa:-):pattern * q:(#:20:0.05)
        * q:&amp;lt;-0.8,0.2&amp;gt;;
DEF enclosure1 = (q ~ aa:-):pattern
        * q:&amp;lt;0.01,-0.98,0.01&amp;gt; * q:&amp;lt;0.5,-0.5&amp;gt;;
DEF enclosure2 = (q ~ aa:-):pattern
        * q:&amp;lt;0.01,-0.98,0.01&amp;gt; * q:1;
&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF building1 = STRUCT:&amp;lt; MAP:V0:columns, MAP:V1:beams, MAP:V1:roofs, MAP:V0:enclosure1, MAP:V1: enclosure2%, deposit% &amp;gt;
WHERE
        S_0 = surface:&amp;lt;60,12,0&amp;gt;:&amp;lt;0,0,0&amp;gt;:&amp;lt;0,0,0&amp;gt;,
        S_1 = surface:&amp;lt;60,12,10&amp;gt;:&amp;lt;0,0,-1&amp;gt;:&amp;lt;0,0,1.0&amp;gt;,
        S_2 = surface:&amp;lt;60,12,12&amp;gt;:&amp;lt;0,0,-2&amp;gt;:&amp;lt;0,0,2.0&amp;gt;,
        V0 = bezier:S3:&amp;lt; S_0, S_1 &amp;gt;,
        V1 = bezier:S3:&amp;lt; S_1, S_2 &amp;gt;
END;
DEF building2 = STRUCT:&amp;lt; MAP:V0:columns, MAP:V1:beams, MAP:V1:roofs, MAP:V0:enclosure1, MAP:V1: enclosure2%, deposit% &amp;gt;
WHERE
        S_0 = surface:&amp;lt;60,12,0&amp;gt;:&amp;lt;0,0,0&amp;gt;:&amp;lt;0,0,0&amp;gt;,
        S_1 = surface:&amp;lt;60,12,10&amp;gt;:&amp;lt;0,0,-1&amp;gt;:&amp;lt;0,0,-1.0&amp;gt;,
        S_2 = surface:&amp;lt;60,12,12&amp;gt;:&amp;lt;0,0,-2&amp;gt;:&amp;lt;0,0,-2.0&amp;gt;,
        V0 = bezier:S3:&amp;lt; S_0, S_1 &amp;gt;,
        V1 = bezier:S3:&amp;lt; S_1, S_2 &amp;gt;
END;
DEF building3 = STRUCT:&amp;lt; MAP:V0:columns, MAP:V1:beams, MAP:V1:roofs, MAP:V0:enclosure1, MAP:V1: enclosure2%, deposit% &amp;gt;
WHERE
        S_0 = surface:&amp;lt;60,12,0&amp;gt;:&amp;lt;0,0,0&amp;gt;:&amp;lt;0,0,0&amp;gt;,
        S_1 = surface:&amp;lt;60,12,10&amp;gt;:&amp;lt;0,0,1&amp;gt;:&amp;lt;0,0,0&amp;gt;,
        S_2 = surface:&amp;lt;60,12,12&amp;gt;:&amp;lt;0,0,2&amp;gt;:&amp;lt;0,0,0&amp;gt;,
        V0 = bezier:S3:&amp;lt; S_0, S_1 &amp;gt;,
        V1 = bezier:S3:&amp;lt; S_1, S_2 &amp;gt;
END;
DEF building4 = STRUCT:&amp;lt; MAP:V0:columns, MAP:V1:beams, MAP:V1:roofs, MAP:V0:enclosure1, MAP:V1: enclosure2%, deposit% &amp;gt;
WHERE
        S_0 = surface:&amp;lt;60,12,0&amp;gt;:&amp;lt;0,0,0&amp;gt;:&amp;lt;0,0,0&amp;gt;,
        S_1 = surface:&amp;lt;60,12,10&amp;gt;:&amp;lt;0,0,0&amp;gt;:&amp;lt;0,0,1&amp;gt;,
        S_2 = surface:&amp;lt;60,12,12&amp;gt;:&amp;lt;0,0,0&amp;gt;:&amp;lt;0,0,2&amp;gt;,
        V0 = bezier:S3:&amp;lt; S_0, S_1 &amp;gt;,
        V1 = bezier:S3:&amp;lt; S_1, S_2 &amp;gt;
END;
DEF loading_rack = (T:1:20~R:&amp;lt;1,2&amp;gt;:(pi/2)~ warehouse_rack:&amp;lt;4,3&amp;gt;:&amp;lt;1.8,  2.5, 1.5&amp;gt;): loading;
DEF deposit = (STRUCT ~ ##:10):&amp;lt; loading_rack , T:1:3.6&amp;gt;;
VIEW: building1;&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;title&quot;&gt;&quot;building1&quot; value&lt;/div&gt;
&lt;h3&gt;Simple road models&lt;/h3&gt;
&lt;p&gt;The function road in Listing 8 takes as input a polycurve output, i.e. a
sequence of triples of control points, as well as a width w, and returns a solid
model of the road having as axis the set of quadratic B •ezier curves produced
by the control points. The set of roads of our model in generated by Listing 9.&lt;/p&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF road(w::isreal) = STRUCT ~ aa:(stripe:&amp;lt;w,6&amp;gt;);
DEF stripe(width::IsReal;n::IsIntPos)
        (points::ismat) = MAP:coordFuncs:domain
WHERE
        coordFuncs = Bezier:s1:points vectsum (s2 scalarvectprod (Norm2 ~DerBezier):points),
        domain = (S:2:(width/2) ~ T:&amp;lt;1,2&amp;gt;:&amp;lt;1E-5,-1&amp;gt;):
                (Intervals:1:n * Intervals:2:1)
END;&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF polycurve (radius::isreal) (points::ismat) = if:&amp;lt; gt:2 ~ len,
    cat ~ addExtremeLinearSegments
    ~ distributeLinearSegmentsBetweenQuadratic, id&amp;gt;  :points
WHERE
  addExtremeLinearSegments =
    [[[k:(first:points), s1~s1]], id, [[last~last, k:(last:points)]]],
  distributeLinearSegmentsBetweenQuadratic =
    rtail~cat~trans~[id,  ar~[trans~[rtail~s3, tail~s1]~trans, K:0]]
    ~ generateQuadraticSegments,
  generateQuadraticSegments = aa:(newpoints:radius) ~ triples,
  triples = trans~[rtail~rtail, tail~rtail, tail~tail],
  newpoints (b::isrealpos) (p1,p2,p3::ispoint) = &amp;lt;p12,p2,p23&amp;gt;
  WHERE
    v12 = p1 vectdiff p2,    v23 = p3 vectdiff p2,
    p12 = p2 vectsum (v12 scalarvectprod (b / vectnorm:v12)),
    p23 = p2 vectsum (v23 scalarvectprod (b / vectnorm:v23))
  END
END;&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF road(width::isreal) =
        STRUCT ~ AA:(stripe:&amp;lt;width,6&amp;gt;);
DEF avenue1 = (road:6 ~ polycurve:10):
        &amp;lt;&amp;lt;0,0&amp;gt;,&amp;lt;0,-74&amp;gt;,&amp;lt;0,-148&amp;gt;&amp;gt;;
DEF avenue2 = (road:6 ~ polycurve:10):
        &amp;lt;&amp;lt;78,-12&amp;gt;,&amp;lt;78,-151&amp;gt;,&amp;lt;-78,-151&amp;gt;,&amp;lt;-78,-12&amp;gt;&amp;gt;;
DEF parking = (T:&amp;lt;1,2&amp;gt;:&amp;lt;3,-141&amp;gt; ~ CUBOID):
        &amp;lt;72,40,0.2&amp;gt;;
DEF road112 = (road:8 ~ polycurve:20):&amp;lt;&amp;lt;0,-160&amp;gt;,&amp;lt;-90,-160&amp;gt;,&amp;lt;-90,4&amp;gt;,&amp;lt;90+170,4&amp;gt;,&amp;lt;90+170,-180&amp;gt;,&amp;lt;90,-180&amp;gt;,&amp;lt;30,-160&amp;gt;,&amp;lt;0,-160&amp;gt;&amp;gt;;
DEF road01 = (STRUCT ~ AA:(road:8 ~ polycurve:20) ~ [ID, AA:[s1, C:+:-8 ~ s2]]):
        &amp;lt; &amp;lt;-190,-160&amp;gt;,&amp;lt;0,-160&amp;gt;,&amp;lt;30,-160&amp;gt;,&amp;lt;90,-180&amp;gt;,&amp;lt;260,-180&amp;gt;,&amp;lt;360,-180&amp;gt; &amp;gt;;
VIEW: road01;
&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;title&quot;&gt;&quot;road01&quot; value&lt;/div&gt;
&lt;h3&gt;The model of a commercial district&lt;/h3&gt;
&lt;p&gt;The VR model of a whole commercial district, including roads, service zones,
parkings and several warehouse building with internal warehouse decks,
merchandise containers, cartons and pallets is generated using the code
discussed in the above subsections, as the value produced by the evaluation
of the commercial district symbol, given in Listing 10 and shown in Figure 1.
Such a virtual environment is very easy to set up or digitize, as it only
requires a small set of points to define the control points of the road axes.&lt;/p&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF triple(p::ispol) =
        (STRUCT ~ ##:3 ~ [ID, T:2 ~ SIZE:2]):p;
DEF double(b1,b2::ispol) =
        STRUCT:&amp;lt;T:&amp;lt;1,2&amp;gt;:&amp;lt;-75,-48&amp;gt;,b1,T:2:-48,b2&amp;gt;;
DEF avenue12 = STRUCT:&amp;lt;avenue1,avenue2,parking,
        S:1:-1:parking,
        (double ~ AA:triple):&amp;lt;building1,building2&amp;gt;,
        (S:1:-1 ~ double ~ AA:triple):&amp;lt;building3,building4&amp;gt; &amp;gt;;
DEF commercial_district = STRUCT:&amp;lt; road01,road112,avenue12,T:1:170,S:1:-1:avenue12 &amp;gt;;
VIEW:commercial_district;&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;title&quot;&gt;Commercial district model&lt;/div&gt;
&lt;div class=&quot;title&quot;&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;footer&quot;&gt;
&lt;div id=&quot;footer-text&quot;&gt;
Last updated 26-Sep-2007 16:12:31 CEST
&lt;/div&gt;
&lt;/div&gt;
 &lt;p&gt;
&lt;/p&gt;
&lt;/div&gt;
			</description>
			<pubDate>Wed, 26 Sep 2007 15:04:06 +0200</pubDate>
			<guid>http://www.dia.uniroma3.it/~paoluzzi/plasm502/gallery/complex_projects/logistic_district/</guid>
		</item>
		<item>
			<title>Leaning tower</title>
			<link>http://www.dia.uniroma3.it/~paoluzzi/plasm502/gallery/complex_projects/s_stefano_rotondo/</link>
			<description>
				&lt;div class="article-thumbnail"&gt;
					&lt;img
						src="http://www.dia.uniroma3.it/~paoluzzi/plasm502/_Media/pisa2.jpeg"
						alt="Leaning tower"
						width="103"
						height="128" /&gt;
				&lt;/div&gt;
&lt;div&gt;&lt;p&gt;&lt;b&gt;
&lt;div id=&quot;header&quot;&gt;
&lt;h1&gt;Leaning tower of Pisa&lt;/h1&gt;
&lt;/div&gt;
&lt;h2&gt;Global parameters&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF scalefactor = 3.16655256;
DEF InternalBasementRadius = scalefactor*0.7;
DEF ExternalBasementRadius = scalefactor*3.2;
DEF BasementHeight = scalefactor*1.3;
DEF WidthBasement = ExternalFirstFloorRadius - InternalFirstFloorRadius;
DEF InternalFirstFloorRadius = scalefactor*1.2;
DEF ExternalFirstFloorRadius = scalefactor*2.5;
DEF InternalWallRadius = scalefactor*1.25;
DEF ExternalWallRadius = scalefactor*2.1;
DEF FirstFloorHeight = 3.15 * scalefactor;
DEF WallHeight = 9.35 * scalefactor;
DEF FirstRingPerimeter = 5.15 * scalefactor * PI;
DEF FirstRingColumnArcWidth = FirstRingPerimeter/12;
DEF ColumnScaling = (WallHeight/6)/(size:3:(Column_1:(pi/24)));&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;Tower basement&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF basament1 = (Cylinder:&amp;lt;ExternalBasementRadius,BasementHeight/2&amp;gt;:24) -
        (Cylinder:&amp;lt;InternalBasementRadius,BasementHeight/2&amp;gt;:24);
DEF basament2 = thebasament - cone2
WHERE
        thebasament = basament1 &amp;amp; cone1,
        cone1 = cone:&amp;lt;ExternalBasementRadius,hcone&amp;gt;:24,
        hcone = tg_alpha * ExternalBasementRadius,
        tg_alpha = (ExternalBasementRadius -
                ExternalFirstFloorRadius)/(BasementHeight/2),
        reversed_cone = S:3:-1:cone1,
        cone2 = T:3:tcone:reversed_cone,
        tcone = tg_alpha * (ExternalBasementRadius - InternalBasementRadius)
END;
DEF Basament = STRUCT:&amp;lt; basament1, T:3:(BasementHeight/2):basament2 &amp;gt;;&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;Tower kernel&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF FirstFloor =
Cylinder:&amp;lt;ExternalFirstFloorRadius,FirstFloorHeight&amp;gt;:24 -
        Cylinder:&amp;lt;InternalFirstFloorRadius,FirstFloorHeight&amp;gt;:24;
DEF Kernel = Cylinder:&amp;lt;ExternalWallRadius,WallHeight&amp;gt;:24 -
        Cylinder:&amp;lt;InternalWallRadius,WallHeight&amp;gt;:24;&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;Tower terrace&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF Terrace = (T:3:(0.095*scalefactor/2) ~ STRUCT):&amp;lt; S:3:-1:wafer1,
wafer1&amp;gt;
WHERE
        wafer1 = terrace1 &amp;amp; cone1,
        terrace1 = Cylinder:&amp;lt;1.1*ExternalFirstFloorRadius,
                0.095*scalefactor/2&amp;gt;:24 -
        Cylinder:&amp;lt;ExternalWallRadius, 0.095*scalefactor/2&amp;gt;:24,
        hcone = tg_alpha * 1.1*ExternalFirstFloorRadius,
        tg_alpha = (0.05*ExternalFirstFloorRadius)/(0.095*scalefactor),
        cone1 = cone:&amp;lt;1.1*ExternalFirstFloorRadius, hcone&amp;gt;:24
END;&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;First tower ring&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF Column_1 (angle::isreal) = (optimize~R:&amp;lt;1,2&amp;gt;:(angle)
        ~T:&amp;lt;1,2,3&amp;gt;:&amp;lt;2.6*scalefactor,0,-0.2*scalefactor&amp;gt;):
        (box TOP basis TOP fusto TOP basis TOP capitello TOP box1)
WHERE
        unit = FirstRingColumnArcWidth/2,
        basis = Cylinder:&amp;lt;0.11*scalefactor,0.03*scalefactor&amp;gt;:18,
        fusto = Cylinder:&amp;lt;0.095*scalefactor,1.75*scalefactor&amp;gt;:18,
        capitello = truncone:&amp;lt;0.09*scalefactor,0.14*scalefactor,0.18*scalefactor&amp;gt;:18,
        box = (T:&amp;lt;1,2&amp;gt;:&amp;lt;-0.15*scalefactor,-0.15*scalefactor&amp;gt;~cuboid):
                &amp;lt;0.30*scalefactor,0.30*scalefactor,0.28*scalefactor&amp;gt;,
        box1 = cuboid:&amp;lt;0.30*scalefactor,0.30*scalefactor,0.05*scalefactor&amp;gt;
END;&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;Other tower rings&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF Column_2 (angle::isreal) = (optimize~R:&amp;lt;1,2&amp;gt;:(angle)
        ~T:&amp;lt;1,2,3&amp;gt;:&amp;lt;2.53*scalefactor,0,0.09*scalefactor&amp;gt;):
        (S:3:columnscaling:( box0 TOP basis0 TOP basis1 TOP basis2 TOP fusto
                TOP basis2 TOP capitello)
                        align:&amp;lt;&amp;lt;1,max,max&amp;gt;,&amp;lt;2,med,med&amp;gt;,&amp;lt;3,max,min&amp;gt;&amp;gt;
        box1)
WHERE
        unit = FirstRingColumnArcWidth/2,
        transl = T:&amp;lt;1,2&amp;gt;:&amp;lt;-0.12*scalefactor,-0.12*scalefactor&amp;gt;,
        box0 = (transl~cuboid):
                &amp;lt;0.24*scalefactor,0.24*scalefactor,0.06*scalefactor&amp;gt;,
        basis0 = Cylinder:&amp;lt;0.11*scalefactor,0.02*scalefactor&amp;gt;:18,
        basis1 = Cylinder:&amp;lt;0.08*scalefactor,0.04*scalefactor&amp;gt;:18,
        basis2 = Cylinder:&amp;lt;0.09*scalefactor,0.02*scalefactor&amp;gt;:18,
        fusto = Cylinder:&amp;lt;0.07*scalefactor,1.40*scalefactor&amp;gt;:18,
        capitello = truncone:&amp;lt;0.07*scalefactor,0.10*scalefactor,0.16*scalefactor&amp;gt;:18,
        box1 = MKPOL:&amp;lt;&amp;lt;&amp;lt;0,y,0&amp;gt;,&amp;lt;0,-:y,0&amp;gt;,&amp;lt;x,y - dy,0&amp;gt;,&amp;lt;x,dy - y,0&amp;gt;,
        &amp;lt;0,y,z&amp;gt;,&amp;lt;0,-:y,z&amp;gt;,&amp;lt;x,y - dy,z&amp;gt;,&amp;lt;x,dy - y,z&amp;gt;&amp;gt;,&amp;lt;1..8&amp;gt;,&amp;lt;(1)&amp;gt;&amp;gt;
        WHERE
                y = 0.13*scalefactor, x = -4*y, z = y, dy = tan:(pi/36)*(-:x)
        END
END;&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;Arcs of first ring&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF Arch (r1,r2,w::IsRealPos) =
        (optimize~R:&amp;lt;1,3&amp;gt;:(pi/-2)~T:3:(w/-2)~STRUCT):&amp;lt;
        (Cylinder:&amp;lt;r2,w&amp;gt;:24 - (Cylinder:&amp;lt;r1,w&amp;gt;:24 +
                (T:2:(-:r2)~CUBOID):&amp;lt;r2,2*r2,w&amp;gt;)) ,
        (T:2:(-:r2)):(CUBOID:&amp;lt;r2*sin:(pi/12),2*r2,w&amp;gt;) -
                (T:2:(-:r1)):(CUBOID:&amp;lt;r2*sin:(pi/12),2*r1,w&amp;gt;)
&amp;gt; ;
DEF Arc_1_1 = T:&amp;lt;1,2,3&amp;gt;:&amp;lt;2.45*scalefactor,0,2.30*scalefactor&amp;gt;:
        ((Arch:&amp;lt; 0.8*unit, unit, unit/2 &amp;gt;) STRUCT (Arch:&amp;lt; unit, 1.05*unit,
                unit/1.5 &amp;gt;))
WHERE
        unit = FirstRingColumnArcWidth/2
END;
DEF Wall_1 = T:3:(2.30*scalefactor):
        (TheCylinder - Ottusangle - Hole:&amp;lt;1.05*unit, unit/1.5&amp;gt; )
WHERE
        unit = FirstRingColumnArcWidth/2,
        TheCylinder = Cylinder:&amp;lt;1.08*ExternalFirstFloorRadius, 1.1*unit&amp;gt;:24 -
        Cylinder:&amp;lt;ExternalWallRadius, 1.1*unit&amp;gt;:24,
        Ottusangle = ((optimize~R:&amp;lt;1,2&amp;gt;:(pi/12)~T:1:(-100)~CUBOID):&amp;lt;200,100,100&amp;gt; +
        (optimize~R:&amp;lt;1,2&amp;gt;:(11*pi/12)~T:1:(-100)~CUBOID):&amp;lt;200,100,100&amp;gt; ),
        Hole (r2,w::isrealpos) = (T:&amp;lt;1,2&amp;gt;:&amp;lt;2.45*scalefactor,0&amp;gt;):(
                (R:&amp;lt;1,3&amp;gt;:(pi/-2)~S:3:2~T:3:(w/-2)):(Cylinder:&amp;lt;r2,2*w&amp;gt;:24 -
                        (T:2:(-:r2)~CUBOID):&amp;lt;r2,2*r2,w&amp;gt;) )
END;
DEF FirstColumnRing = (STRUCT ~ ##:12):&amp;lt; Column_1:(pi/12), Arc_1_1,
        Wall_1, R:&amp;lt;1,2&amp;gt;:(pi/6) &amp;gt;;&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;Arcs of other rings&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF Arc_2_1(angle::isreal) = (optimize~R:&amp;lt;1,2&amp;gt;:(angle)~T:&amp;lt;1,2,3&amp;gt;:
                &amp;lt;2.40*scalefactor,0,2.10*scalefactor*columnscaling&amp;gt;):
                        ((Arch:&amp;lt; 0.65*unit, 0.9*unit, 1.5*unit &amp;gt;) STRUCT (Arch:&amp;lt; 0.9*unit,
                        unit, unit/0.75 &amp;gt;))
WHERE
        unit = FirstRingColumnArcWidth/4
END;
DEF Wall_2 (angle::isreal) =
        (optimize~R:&amp;lt;1,2&amp;gt;:(angle)~T:3:(2.10*scalefactor*columnscaling)):
                (TheCylinder - Ottusangle - Hole:&amp;lt;unit, unit/0.75&amp;gt; )
WHERE
        unit = FirstRingColumnArcWidth/4,
        TheCylinder = Cylinder:&amp;lt;1.05*ExternalFirstFloorRadius, 1.35*unit&amp;gt;:48 -
        Cylinder:&amp;lt;ExternalWallRadius, 1.35*unit&amp;gt;:24,
        Ottusangle = ((optimize~R:&amp;lt;1,2&amp;gt;:(pi/24)~T:1:(-100)~CUBOID):&amp;lt;200,100,100&amp;gt; +
                (optimize~R:&amp;lt;1,2&amp;gt;:(23*pi/24)~T:1:(-100)~CUBOID):&amp;lt;200,100,100&amp;gt; ),
        Hole (r2,w::isrealpos) = (T:&amp;lt;1,2&amp;gt;:&amp;lt;2.45*scalefactor,0&amp;gt;):(
                (R:&amp;lt;1,3&amp;gt;:(pi/-2)~S:3:2~T:3:(w/-2)):(Cylinder:&amp;lt;r2,2*w&amp;gt;:24 -
                        (T:2:(-:r2)~CUBOID):&amp;lt;r2,2*r2,w&amp;gt;) )
END;
DEF SecondColumnRing = (STRUCT ~ ##:24):&amp;lt; Column_2:(pi/12),
                Arc_2_1:(pi/24), Wall_2:(pi/24), R:&amp;lt;1,2&amp;gt;:(pi/12) &amp;gt;;&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;Internal steps&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF radiusSteps = 1.9 * scalefactor;
DEF pitchSteps = (7/1.5) * scalefactor;
DEF angleSteps = 21*pi/4 ;
DEF numberOfSteps = 293;
DEF alphaStep = -:angleSteps/numberOfSteps;
DEF zetaStep = (FirstFloorHeight+WallHeight)/numberOfSteps;
DEF stepVolume = (T:1:(-:radiusSteps)~CUBOID):(&amp;lt;0.4,0.11,0.8&amp;gt;
                scalarvectprod scalefactor);
DEF stepsSegment = (optimize~STRUCT~CAT~TRANS):
        &amp;lt; translations, rotations, objects &amp;gt;
WHERE
        translations = #:17:(T:3:zetaStep),
        rotations = #:17:(R:&amp;lt;1,2&amp;gt;:alphaStep),
        objects = #:17:stepVolume
END;
DEF steps = (optimize~STRUCT~##:17):&amp;lt; stepsSegment,
                R:&amp;lt;1,2&amp;gt;:(17*alphaStep), T:3:(17*ZetaStep) &amp;gt;;
DEF fabric = STRUCT:&amp;lt;
        T:3:(-:BasementHeight):Basament, Steps color Red,
        FirstFloor, T:3:FirstFloorHeight:Kernel,
        FirstColumnRing,
        T:3:(FirstFloorHeight - 0.095*scalefactor),
        Terrace, (STRUCT ~ ##:5):&amp;lt; SecondColumnRing, T:3:(WallHeight/5),
                Terrace &amp;gt;,
&amp;gt;;&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;Tower cap&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF lastFloorHeight = WallHeight/5;
DEF TowerCap = lastWall STRUCT
        ((T:3:lastFloorHeight~JOIN~truncone:&amp;lt; ExternalFirstFloorRadius,
                ExternalWallRadius, 0.4*scalefactor &amp;gt;):24
                - Join:(MySphere:externalWallRadius:&amp;lt;12,24&amp;gt;))
WHERE
        lastWall = Cylinder:&amp;lt;ExternalWallRadius,lastFloorHeight&amp;gt;:24 -
                Cylinder:&amp;lt;InternalWallRadius,lastFloorHeight&amp;gt;:24
END;
DEF MySphere (radius::IsRealPos)(n,m::IsIntPos)
        = MAP:[fx,fy,fz]:domain
WHERE
        fx = K:radius * - ~ SIN ~ S2 * COS ~ S1,
        fy = K:radius * COS ~ S1 * COS ~ S2,
        fz = K:radius * SIN ~ S1,
        domain = (Intervals:PI:n * Intervals:(2*PI):m)
END;
DEF fabric = STRUCT:&amp;lt;
        T:3:(-:BasementHeight):Basament, Steps color Red,
        FirstFloor, T:3:FirstFloorHeight:Kernel,
        FirstColumnRing,
        T:3:(FirstFloorHeight - 0.095*scalefactor),
        Terrace, (STRUCT ~ ##:6):&amp;lt; SecondColumnRing, T:3:(WallHeight/5),
                Terrace &amp;gt;,
        T:3:(WallHeight),
        TowerCap
&amp;gt;;&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;Tower cap (seventh order)&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF Int7Height = scalefactor*1.7;
DEF Ext7Height = scalefactor*2.3;
DEF c11 = bezier:s1:&amp;lt;&amp;lt;InternalWallRadius,0,0&amp;gt;,&amp;lt;InternalWallRadius,0,Int7Height&amp;gt;&amp;gt;;
DEF c12 = bezier:s1:&amp;lt;&amp;lt;ExternalWallRadius,0,0&amp;gt;,&amp;lt;ExternalWallRadius,0,Ext7Height&amp;gt;&amp;gt;;
DEF surf1 = bezier:s2:&amp;lt;c11,c12&amp;gt;;
DEF c21 = hermite:&amp;lt;&amp;lt;InternalWallRadius,0,Int7Height&amp;gt;,&amp;lt;0.75,0,Ext7Height - 0.25&amp;gt;,&amp;lt;-1,0,2.5&amp;gt;,&amp;lt;-3,0,0&amp;gt;&amp;gt;;
DEF c22 = bezier:s1:&amp;lt;&amp;lt;ExternalWallRadius,0,Ext7Height&amp;gt;,&amp;lt;0.75,0,Ext7Height&amp;gt;&amp;gt;;
DEF surf2 = bezier:s2:&amp;lt;c21,c22&amp;gt;;
DEF c31 = bezier:s1: &amp;lt;&amp;lt;ExternalWallRadius,0,Int7Height&amp;gt;,&amp;lt;ExternalWallRadius,0,Ext7Height&amp;gt;&amp;gt;;
DEF c32 = bezier:s1: &amp;lt;&amp;lt;ExternalWallRadius+1,0,Int7Height&amp;gt;,
        &amp;lt;ExternalWallRadius+1,0,(Int7Height +Ext7Height)/2&amp;gt;&amp;gt;;
DEF surf3 = bezier:s2:&amp;lt;c31,c32&amp;gt;;
DEF solid (surf::isvect) = &amp;lt;
        (s1:surf * cos~s3) - (s2:surf * sin~s3),
        (s2:surf * cos~s3) + (s1:surf * sin~s3),
        s3:surf &amp;gt;;
DEF out1 = MAP:(solid:surf1):(intervals:1:1 * intervals:1:1 * intervals:(3*pi/2):18);
DEF out2 = MAP:(solid:surf2):(intervals:1:9 * intervals:1:1 * intervals:(3*pi/2):18);
DEF out3 = MAP:(solid:surf3):((sqr~intervals:1):1 * intervals:(3*pi/2):18);
DEF cap = STRUCT:&amp;lt;out1,out2,out3&amp;gt;;&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;Tower bell&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF Column_b = (optimize
        ~T:&amp;lt;1,2,3&amp;gt;:&amp;lt; (-18/24)*2.53*scalefactor,0,0.09*scalefactor&amp;gt;):
        (S:3:columnscaling:( box0 TOP basis0 TOP basis1 TOP basis2 TOP fusto
                TOP basis2 TOP capitello)
                        align:&amp;lt;&amp;lt;1,max,max&amp;gt;,&amp;lt;2,med,med&amp;gt;,&amp;lt;3,max,min&amp;gt;&amp;gt;
        box1)
WHERE
        unit = FirstRingColumnArcWidth/2,
        transl = T:&amp;lt;1,2&amp;gt;:&amp;lt;-0.12*scalefactor,-0.12*scalefactor&amp;gt;,
        box0 = (transl~cuboid):&amp;lt;0.24*scalefactor,0.24*scalefactor,0.06*scalefactor&amp;gt;,
        basis0 = Cylinder:&amp;lt;0.11*scalefactor,0.02*scalefactor&amp;gt;:18,
        basis1 = Cylinder:&amp;lt;0.08*scalefactor,0.04*scalefactor&amp;gt;:18,
        basis2 = Cylinder:&amp;lt;0.09*scalefactor,0.02*scalefactor&amp;gt;:18,
        fusto = Cylinder:&amp;lt;0.07*scalefactor,1.40*scalefactor&amp;gt;:18,
        capitello = truncone:&amp;lt;0.07*scalefactor,0.10*scalefactor,0.16*scalefactor&amp;gt;:18,
        box1 = box0
END;
DEF Arc_2_b = (optimize~R:&amp;lt;1,2&amp;gt;:(pi/18)~T:&amp;lt;1,2,3&amp;gt;:
                &amp;lt;(18/ 24)*2.53*scalefactor,0,2.08*scalefactor*columnscaling&amp;gt;):
                        (Arch:&amp;lt; 0.65*unit, 0.9*unit, 0.5*unit &amp;gt; STRUCT Arch:&amp;lt; 0.9*unit,
                        1.1*unit, 0.65*unit &amp;gt; )
WHERE
        unit = FirstRingColumnArcWidth/4
END;
DEF Wall_b (angle::isreal) = (optimize~R:&amp;lt;1,2&amp;gt;:(angle)
        ~ T:3:((18/ 24)*2.10*scalefactor*columnscaling)):
                (TheCylinder - Ottusangle - Hole:&amp;lt;unit, unit/0.75&amp;gt; )
WHERE
        unit = FirstRingColumnArcWidth/4,
        TheCylinder = Cylinder:&amp;lt;1.05*ExternalFirstFloorRadius, 1.35*unit&amp;gt;:48 -
        Cylinder:&amp;lt;ExternalWallRadius, 1.35*unit&amp;gt;:24,
        Ottusangle = ((optimize~R:&amp;lt;1,2&amp;gt;:(pi/24)~T:1:(-100)~CUBOID):&amp;lt;200,100,100&amp;gt; +
        (optimize~R:&amp;lt;1,2&amp;gt;:(23*pi/24)~T:1:(-100)~CUBOID):&amp;lt;200,100,100&amp;gt; ),
        Hole (r2,w::isrealpos) = (T:&amp;lt;1,2&amp;gt;:&amp;lt;2.45*scalefactor,0&amp;gt;):(
        (R:&amp;lt;1,3&amp;gt;:(pi/-2)~S:3:2~T:3:(w/-2)):(Cylinder:&amp;lt;r2,2*w&amp;gt;:24 -
                (T:2:(-:r2)~CUBOID):&amp;lt;r2,2*r2,w&amp;gt;) )
END;
DEF TopTower = STRUCT:&amp;lt; SecondColumnRing, cap, T:3:(WallHeight/5), Terrace&amp;gt;;&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;Belt Tower&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF tooth = (optimize~STRUCT):&amp;lt; lungo, R:&amp;lt;1,2&amp;gt;:(pi/106), corto &amp;gt;
where
        raggio = ExternalWallRadius,
        lungo = mymap1:&amp;lt;0,0.1&amp;gt; TOP mymap2:&amp;lt;0.1,0.1&amp;gt;,
        corto = mymap2:&amp;lt; -0.05,0.2&amp;gt;,
        mymap1 (dr,h::isreal) = MAP:&amp;lt;(s2+s3)*cos~s1,(s2+s3)*sin~s1,s3&amp;gt;:
        (intervals:(pi/106):1 * T:1:(InternalWallRadius):(intervals:(width:dr):1)
                * intervals:h:1),
        mymap2 (dr,h::isreal) = MAP:&amp;lt;(s2)*cos~s1,(s2)*sin~s1,s3&amp;gt;:(intervals:(pi/106):1
                * T:1:(InternalWallRadius):(intervals:(width:dr):1) * intervals:h:1),
        width(dr::isreal) = ExternalWallRadius - InternalWallRadius + dr
end;
DEF plateau = (optimize~STRUCT~##:106):&amp;lt;tooth,R:&amp;lt;1,2&amp;gt;:(2*pi/106)&amp;gt;;
DEF BeltColumnRing = (STRUCT ~ ##:6):
        &amp;lt; Column_b, Arc_2_b, R:&amp;lt;1,2&amp;gt;:(pi/9),Column_b, Arc_2_b,
        R:&amp;lt;1,2&amp;gt;:(pi/9), Arc_2_b, R:&amp;lt;1,2&amp;gt;:(pi/9) &amp;gt;
        STRUCT T:3:5.75:plateau;
DEF BeltWalls = MyRing:(3*pi/9):
        &amp;lt;InternalWallRadius,ExternalWallRadius*6/7&amp;gt;:&amp;lt;6,1&amp;gt; * Q:5.75;
DEF SmallWindow1 = MyRing:((3*pi)/(18*4)):
        &amp;lt;InternalWallRadius - 1,ExternalWallRadius*6/7 + 1&amp;gt;:&amp;lt;2,1&amp;gt; * Q:1.75;
DEF SmallWindow2 = MyRing:((4*pi)/(18*5) + pi/64):
        &amp;lt;InternalWallRadius - 1,ExternalWallRadius*6/7 + 1&amp;gt;:&amp;lt;2,1&amp;gt; * Q:&amp;lt;-1.75,-0.35,2&amp;gt;;
DEF MyRing (angle::IsReal)(r1,r2::IsRealPos)(n,m::IsIntPos) =
        MAP:[s2 * cos ~ S1, s2 * sin ~ S1]:domain
WHERE
        domain = T:2:r1:(Intervals:angle:n * Intervals:(r2 - r1):m)
END;
DEF hole3 (angle::IsReal)(r1,r2::IsRealPos) = MAP:
        (Bezier:S3:([portal1:(angle), portal2:(angle)]:&amp;lt;r1,r2&amp;gt;)):
        (intervals:1:1 * intervals:1:12 * intervals:1:1)
WHERE
        portal1(angle::IsReal)(r1,r2::IsRealPos) =
                CubicHermite:S2:&amp;lt; c1,c2,t1,t2 &amp;gt;,
        portal2(angle::IsReal)(r1,r2::IsRealPos) =
                Bezier:S2:&amp;lt; c1,c2 &amp;gt; vectsum &amp;lt;K:0,K:0,K:-0.1&amp;gt;,
        c1 = Bezier:S1:line1,
        line1 = &amp;lt;&amp;lt;r1,0,0&amp;gt;,&amp;lt;r2,0,0&amp;gt;&amp;gt;,
        c2 = Bezier:S1:line2,
        line2 = AA:(UK ~ R:&amp;lt;1,2&amp;gt;:angle ~ MK):line1,
        t1 = Bezier:S1:&amp;lt;&amp;lt;0,0,2&amp;gt;,&amp;lt;0,0,4&amp;gt;&amp;gt;,
        t2 = Bezier:S1:&amp;lt;&amp;lt;0,0,-2&amp;gt;,&amp;lt;0,0,-4&amp;gt;&amp;gt;
END;
DEF Window3 = MyRing:(2*pi/9 - 0.2):
        &amp;lt;InternalWallRadius - 1,ExternalWallRadius*6/7 + 1&amp;gt;:&amp;lt;1,1&amp;gt; * Q:2.5;
DEF Hole3 = (T:3:(2.5)~R:&amp;lt;1,2&amp;gt;:(0.15/2)):(hole3:(pi/9):
        &amp;lt;InternalWallRadius - 1,ExternalWallRadius*6/7 + 1 &amp;gt;);
DEF BeltTower = (STRUCT~##:6):&amp;lt;SectorWall,R:&amp;lt;1,2&amp;gt;:(pi/3)&amp;gt; STRUCT
        BeltColumnRing;
DEF SectorWall = -:&amp;lt;
        BeltWalls,
        R:&amp;lt;1,2&amp;gt;:((3*pi)/(18*5)):SmallWindow1,
        R:&amp;lt;1,2&amp;gt;:(pi/36):SmallWindow2,
        R:&amp;lt;1,2&amp;gt;:(pi/9 + 0.1):Window3 &amp;gt; % STRUCT
        (R:&amp;lt;1,2&amp;gt;:(pi/9 + 0.1):Hole3 color red) % ;&lt;/tt&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;Final tower assembly&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;&lt;tt&gt;DEF fabric = STRUCT:&amp;lt; T:3:(-:BasementHeight):Basament, Steps color Red,
FirstFloor, T:3:FirstFloorHeight:Kernel,
        FirstColumnRing,
        T:3:(FirstFloorHeight - 0.095*scalefactor),
        Terrace,
        (STRUCT ~ ##:5):&amp;lt; SecondColumnRing, T:3:(WallHeight/5), Terrace &amp;gt;,
        T:3:WallHeight, TowerCap, TopTower,
        T:3:(max:3:TowerCap - 0.3), BeltTower
&amp;gt;;
view:fabric;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: Times; font-size: 16px; font-weight: normal; white-space: normal;&quot;&gt;&lt;tt style=&quot;font-family: Courier; font-size: 10px; white-space: pre;&quot;&gt;&lt;b&gt;&lt;tt&gt;% export:(fabric):~/plasm/wrl/pisa.wrl; %&lt;/tt&gt;&lt;/b&gt;&lt;/tt&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;footer&quot;&gt;
&lt;div id=&quot;footer-text&quot;&gt;
Last updated 27-Sep-2007 19:52:49 CEST
&lt;/div&gt;
&lt;/div&gt;
 &lt;/b&gt;&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/div&gt;
			</description>
			<pubDate>Sat, 20 Jan 2007 05:47:19 +0100</pubDate>
			<guid>http://www.dia.uniroma3.it/~paoluzzi/plasm502/gallery/complex_projects/s_stefano_rotondo/</guid>
		</item>
 	</channel>
</rss>
