<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How can I display different densities in three levels with different colors? in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/how-can-i-display-different-densities-in-three/m-p/438203#M5990</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;very thanks Cheryl Lau&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Apr 2018 18:08:51 GMT</pubDate>
    <dc:creator>maziyaryousefi</dc:creator>
    <dc:date>2018-04-26T18:08:51Z</dc:date>
    <item>
      <title>How can I display different densities in three levels with different colors?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/how-can-i-display-different-densities-in-three/m-p/438201#M5988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello dear friends&lt;/P&gt;&lt;UL class="" style="color: rgba(0, 0, 0, 0.7); background: 0px 0px #ffffff; border: 0px; font-size: 17px; padding: 16px 8px 0px;"&gt;&lt;LI class="" style="background: 0px 0px; border: 0px; font-size: 17px;"&gt;&lt;/LI&gt;&lt;LI class="" style="background: 0px 0px; border: 0px; font-size: 17px;"&gt;&lt;UL class="" style="background: 0px 0px; border: 0px; font-size: 17px;"&gt;&lt;LI class="" style="background: 0px 0px; border: 0px; font-size: 17px; margin: 0px 0px 4px;"&gt;&lt;DIV class="" style="background: 0px 0px #e1e9ee; border: 0px; font-size: 17px; padding: 8px 12px;"&gt;&lt;P class="" style="color: rgba(0, 0, 0, 0.85); background: 0px 0px; border: 0px;"&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;UL&gt;&lt;LI class="" style="background: 0px 0px; border: 0px;"&gt;&lt;UL class="" style="background: 0px 0px; border: 0px;"&gt;&lt;LI class="" style="background: 0px 0px; border: 0px; margin: 0px 0px 4px;"&gt;&lt;DIV class="" style="background: 0px 0px #e1e9ee; border: 0px; padding: 8px 12px;"&gt;&lt;P class="" style="color: rgba(0, 0, 0, 0.85); background: 0px 0px; border: 0px;"&gt;&lt;SPAN style="border: 0px; background: 0px 0px;"&gt;I wrote the rules for calculation the density&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class="" style="background: 0px 0px #e1e9ee; border: 0px; padding: 8px 12px;"&gt;&lt;P&gt;/**&lt;BR /&gt; * File: FAR.cga&lt;BR /&gt; * Created: 3 Dec 2017 17:57:03 GMT&lt;BR /&gt; * Author: mazyar&lt;BR /&gt; */&lt;/P&gt;&lt;P&gt;version "2017.1"&lt;/P&gt;&lt;P&gt;@Group("Floor Num &amp;amp; Height",0) @order(0)&lt;BR /&gt;@Range(1,15)&lt;BR /&gt;attr FloorNum =rint(Height/3)&lt;/P&gt;&lt;P&gt;attr FloorHeight =3&lt;/P&gt;&lt;P&gt;attr Height =0&lt;/P&gt;&lt;P&gt;#####################################################&lt;BR /&gt;@Range(0,1)&lt;BR /&gt;attr Transparent =1&lt;/P&gt;&lt;P&gt;#####################################################&lt;/P&gt;&lt;P&gt;@Group("Building_Setback",3) @order(0)&lt;/P&gt;&lt;P&gt;@Range(0,10)&lt;BR /&gt;attr Front =5&lt;BR /&gt; &lt;BR /&gt;@Range(0,10)&lt;BR /&gt;attr Back =3&lt;/P&gt;&lt;P&gt;@Range(0,10)&lt;BR /&gt;attr Side =2&lt;/P&gt;&lt;P&gt;@Hidden&lt;BR /&gt;attr ParcelArea =0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;###################################################&lt;/P&gt;&lt;P&gt;@Group("FRA Reporting",3) @order(0)&lt;BR /&gt;@color&lt;BR /&gt;attr Low_FAR_Color ="#FF00FF"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Group("FRA Reporting",3) @order(1)&lt;/P&gt;&lt;P&gt;@color&lt;BR /&gt;attr Medain_FAR_Color ="#00FF00"&lt;/P&gt;&lt;P&gt;@Group("FRA Reporting",3) @order(2)&lt;/P&gt;&lt;P&gt;@color&lt;BR /&gt;attr High_FAR_Color ="#0000FF"&lt;/P&gt;&lt;P&gt;##############################################&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Lot --&amp;gt;&lt;BR /&gt;set(ParcelArea ,geometry.area())&lt;BR /&gt;report("LotArea" ,geometry.area())&lt;BR /&gt;setback(Front) { street.front : NIL | remainder :&lt;BR /&gt; setback(Back) { street.back : NIL | remainder :&lt;BR /&gt; setback(Side) { street.side : NIL | remainder :&lt;BR /&gt; Building&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Building --&amp;gt;&lt;BR /&gt;extrude(FloorNum *FloorHeight)&lt;BR /&gt;split(y) { ~FloorHeight : Floors }*&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Floors --&amp;gt;&lt;BR /&gt;case FAR &amp;gt; 0 &amp;amp;&amp;amp; FAR &amp;lt;= 30 :color(Low_FAR_Color)set(material.opacity,0.4)&lt;BR /&gt;FARReporting&lt;BR /&gt;case FAR &amp;gt; 30 &amp;amp;&amp;amp; FAR &amp;lt;= 60 :color(Medain_FAR_Color) set(material.opacity,0.4)&lt;BR /&gt;FARReporting&lt;BR /&gt;case FAR &amp;gt; 60 &amp;amp;&amp;amp; FAR &amp;lt;= 100 :color( High_FAR_Color) set(material.opacity,0.4)&lt;BR /&gt;FARReporting&lt;BR /&gt;else :color(1,1,1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FARReporting --&amp;gt;&lt;BR /&gt;report("FARBuilding" ,geometry.area(bottom)*FloorNum/ParcelArea)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FAR =geometry.area(bottom)*FloorNum/ParcelArea&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/*ReportingBuilding --&amp;gt;&lt;BR /&gt;case FAR &amp;lt;= 0.30 :color(Low_FAR_Color)&lt;BR /&gt;set(material.specular.r,1)&lt;BR /&gt;set(material.specular.g,1)&lt;BR /&gt;set(material.specular.b,1)&lt;BR /&gt;set(material.opacity,Transparent)&lt;BR /&gt;set(material.reflectivity,0.5)&lt;BR /&gt;set(material.shininess,50)&lt;BR /&gt;case FAR &amp;gt; 0.30 &amp;amp;&amp;amp; FAR &amp;lt;= 0.60 :color(Medain_FAR_Color)&lt;BR /&gt;set(material.specular.r,1)&lt;BR /&gt;set(material.specular.g,1)&lt;BR /&gt;set(material.specular.b,1)&lt;BR /&gt;set(material.opacity,Transparent)&lt;BR /&gt;set(material.reflectivity,0.5)&lt;BR /&gt;set(material.shininess,50)&lt;BR /&gt;case FAR &amp;gt; 0.6 &amp;amp;&amp;amp; FAR &amp;lt;= 1 :color( High_FAR_Color)&lt;BR /&gt;set(material.specular.r,1)&lt;BR /&gt;set(material.specular.g,1)&lt;BR /&gt;set(material.specular.b,1)&lt;BR /&gt;set(material.opacity,Transparent)&lt;BR /&gt;set(material.reflectivity,0.5)&lt;BR /&gt;set(material.shininess,50)&lt;BR /&gt;else :color(1,1,1)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL class="" style="background: 0px 0px #ffffff; border: 0px;"&gt;&lt;LI class="" style="background: 0px 0px; border: 0px; margin: 0px 0px 4px;"&gt;&lt;DIV class="" style="background: 0px 0px #e1e9ee; border: 0px; padding: 8px 12px;"&gt;&lt;P class="" style="color: rgba(0, 0, 0, 0.85); background: 0px 0px; border: 0px; font-size: 15px;"&gt;&lt;SPAN style="border: 0px; background: 0px 0px; font-size: 15px;"&gt;these are my rules for calculation the density&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI class="" style="background: 0px 0px; border: 0px; margin: 0px 0px 4px;"&gt;&lt;DIV class="" style="background: 0px 0px #e1e9ee; border: 0px; padding: 8px 12px;"&gt;&lt;P class="" style="color: rgba(0, 0, 0, 0.85); background: 0px 0px; border: 0px; font-size: 15px;"&gt;&lt;SPAN style="border: 0px; background: 0px 0px; font-size: 15px;"&gt;now i want to classify densities in three modes of low density , moderate density (average) and high density&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI class="" style="background: 0px 0px; border: 0px; margin: 0px 0px 4px;"&gt;&lt;DIV class="" style="background: 0px 0px #e1e9ee; border: 0px; padding: 8px 12px;"&gt;&lt;P class="" style="color: rgba(0, 0, 0, 0.85); background: 0px 0px; border: 0px; font-size: 15px;"&gt;&lt;SPAN style="border: 0px; background: 0px 0px; font-size: 15px;"&gt;so i can each floor is shown in a different color&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="" style="color: rgba(0, 0, 0, 0.85); background: 0px 0px; border: 0px; font-size: 15px;"&gt;&lt;SPAN class="" style="background: 0px 0px; border: 0px; font-size: 15px;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL class="" style="color: rgba(0, 0, 0, 0.7); background: 0px 0px #ffffff; border: 0px; font-size: 17px;"&gt;&lt;LI class="" style="background: 0px 0px; border: 0px; font-size: 17px; margin: 0px 0px 4px;"&gt;&lt;DIV class="" style="background: 0px 0px #e1e9ee; border: 0px; font-size: 17px; padding: 8px 12px;"&gt;&lt;P class="" style="background: 0px 0px; border: 0px;"&gt;&lt;SPAN style="border: 0px; background: 0px 0px;"&gt;how do i do it?&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI class="" style="background: 0px 0px; border: 0px; font-size: 17px; margin: 0px 0px 4px;"&gt;&lt;DIV class="" style="background: 0px 0px #e1e9ee; border: 0px; font-size: 17px; padding: 8px 12px;"&gt;&lt;P class="" style="background: 0px 0px; border: 0px;"&gt;&lt;SPAN style="border: 0px; background: 0px 0px;"&gt;considering that the densities are in percent&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI class="" style="background: 0px 0px; border: 0px; font-size: 17px; margin: 0px 0px 4px;"&gt;&lt;DIV class="" style="background: 0px 0px #e1e9ee; border: 0px; font-size: 17px; padding: 8px 12px;"&gt;&lt;P class="" style="background: 0px 0px; border: 0px;"&gt;&lt;SPAN style="border: 0px; background: 0px 0px;"&gt;but in the conditional function i e case &amp;amp; else , the number can not be written as percent&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="" style="background: 0px 0px; border: 0px;"&gt;&lt;SPAN class="" style="background: 0px 0px; border: 0px;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL class="" style="background: 0px 0px #ffffff; border: 0px;"&gt;&lt;LI class="" style="background: 0px 0px; border: 0px; margin: 0px 0px 4px;"&gt;&lt;DIV class="" style="background: 0px 0px #e1e9ee; border: 0px; padding: 8px 12px;"&gt;&lt;P class="" style="color: rgba(0, 0, 0, 0.85); background: 0px 0px; border: 0px; font-size: 15px;"&gt;Floors --&amp;gt;&lt;BR /&gt;case FAR &amp;gt; 0 &amp;amp;&amp;amp; FAR &amp;lt;= 30 :color(Low_FAR_Color)set(material.opacity,0.4)&lt;BR /&gt;FARReporting&lt;BR /&gt;case FAR &amp;gt; 30 &amp;amp;&amp;amp; FAR &amp;lt;= 60 :color(Medain_FAR_Color) set(material.opacity,0.4)&lt;BR /&gt;FARReporting&lt;BR /&gt;case FAR &amp;gt; 60 &amp;amp;&amp;amp; FAR &amp;lt;= 100 :color( High_FAR_Color) set(material.opacity,0.4)&lt;BR /&gt;FARReporting&lt;BR /&gt;else :color(1,1,1)&lt;/P&gt;&lt;P class="" style="color: rgba(0, 0, 0, 0.85); background: 0px 0px; border: 0px; font-size: 15px;"&gt;&lt;/P&gt;&lt;UL class="" style="color: rgba(0, 0, 0, 0.7); background: 0px 0px #ffffff; border: 0px; font-size: 17px;"&gt;&lt;LI class="" style="background: 0px 0px; border: 0px; font-size: 17px; margin: 0px 0px 4px;"&gt;&lt;DIV class="" style="background: 0px 0px #e1e9ee; border: 0px; font-size: 17px; padding: 8px 12px;"&gt;&lt;P class="" style="background: 0px 0px; border: 0px;"&gt;&lt;SPAN style="border: 0px; background: 0px 0px;"&gt;I mean this part&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="" style="color: rgba(0, 0, 0, 0.85); background: 0px 0px; border: 0px;"&gt;&lt;SPAN style="border: 0px; background: 0px 0px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI class="" style="background: 0px 0px; border: 0px;"&gt;&lt;UL class="" style="background: 0px 0px; border: 0px;"&gt;&lt;LI class="" style="background: 0px 0px; border: 0px; margin: 0px 0px 4px;"&gt;&lt;DIV class="" style="background: 0px 0px #e1e9ee; border: 0px; padding: 8px 12px;"&gt; &lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL class="" style="background: 0px 0px; border: 0px;"&gt;&lt;LI class="" style="background: 0px 0px; border: 0px; margin: 0px 0px 4px;"&gt;&lt;DIV class="" style="background: 0px 0px #e1e9ee; border: 0px; padding: 8px 12px;"&gt; &lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI class="" style="background: 0px 0px; border: 0px; font-size: 17px;"&gt;&lt;UL class="" style="background: 0px 0px; border: 0px; font-size: 17px;"&gt;&lt;LI class="" style="background: 0px 0px; border: 0px; font-size: 17px; margin: 0px 0px 4px;"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Dec 2017 08:28:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/how-can-i-display-different-densities-in-three/m-p/438201#M5988</guid>
      <dc:creator>maziyaryousefi</dc:creator>
      <dc:date>2017-12-17T08:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: How can I display different densities in three levels with different colors?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/how-can-i-display-different-densities-in-three/m-p/438202#M5989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure I understand what you want to do.&amp;nbsp; If FAR is calculated for the building as the total floor area divided by the lot area, then&amp;nbsp;there is one value for FAR for the whole building.&amp;nbsp; How do you want to calculate FAR per floor?&amp;nbsp; Do you want to consider only the floors up until that floor, meaning that the floors above that floor do not count?&amp;nbsp; For example, if the building has 5 floors total, would the FAR value for the second floor only consider the areas of the first and second floors, disregarding the third, fourth, and fifth floors?&amp;nbsp; In that case, you can change your calculation of FAR to use split.index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;FAR = geometry.area(bottom)*(split.index+1)/ParcelArea&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This gives you the floor area of one floor multiplied by the floor number all divided by the parcel area.&amp;nbsp; Note that split.index starts at 0 for the ground floor, so add one to get the floor number.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2018 17:39:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/how-can-i-display-different-densities-in-three/m-p/438202#M5989</guid>
      <dc:creator>CherylLau</dc:creator>
      <dc:date>2018-01-04T17:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: How can I display different densities in three levels with different colors?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/how-can-i-display-different-densities-in-three/m-p/438203#M5990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;very thanks Cheryl Lau&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2018 18:08:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/how-can-i-display-different-densities-in-three/m-p/438203#M5990</guid>
      <dc:creator>maziyaryousefi</dc:creator>
      <dc:date>2018-04-26T18:08:51Z</dc:date>
    </item>
  </channel>
</rss>

