<?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: Exponentially changing attribute in a function in CGA rule in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/exponentially-changing-attribute-in-a-function-in/m-p/412280#M5638</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for example in this case, you can apply it in any footprint and see the shape:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;attr Factor = 0.97&lt;/P&gt;&lt;P&gt;attr Depth = 0.01&lt;/P&gt;&lt;P&gt;attr Stop = 0.1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lot--&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; extrude(Depth)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; center(xyz)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; X&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; comp(f) {top : Levels}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Levels--&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; case(scope.sx &amp;gt; Stop) :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s('Factor, 'Factor, 0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; center(xy)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; extrude(Depth-0.02)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comp(f){top : Levels}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NIL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The target is in each repetition the attribute "Factor" to be smaller than the previous one. So, the higher the floor, the smaller the size becomes exponentially.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: it should work as I want it with &lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;attr Depth = 0.1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Jul 2016 16:52:48 GMT</pubDate>
    <dc:creator>GeorgiosAnastasiou</dc:creator>
    <dc:date>2016-07-05T16:52:48Z</dc:date>
    <item>
      <title>Exponentially changing attribute in a function in CGA rule</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/exponentially-changing-attribute-in-a-function-in/m-p/412279#M5637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a CGA rule I have a repeating function that needs to be changing the set attribute value exponentially and not proportionally as I have it now. One way to do it could be by setting an attribute inside the function (like in python), but it is not supported. What would be a way of doing that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2016 16:38:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/exponentially-changing-attribute-in-a-function-in/m-p/412279#M5637</guid>
      <dc:creator>GeorgiosAnastasiou</dc:creator>
      <dc:date>2016-07-05T16:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Exponentially changing attribute in a function in CGA rule</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/exponentially-changing-attribute-in-a-function-in/m-p/412280#M5638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for example in this case, you can apply it in any footprint and see the shape:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;attr Factor = 0.97&lt;/P&gt;&lt;P&gt;attr Depth = 0.01&lt;/P&gt;&lt;P&gt;attr Stop = 0.1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lot--&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; extrude(Depth)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; center(xyz)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; X&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; comp(f) {top : Levels}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Levels--&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; case(scope.sx &amp;gt; Stop) :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s('Factor, 'Factor, 0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; center(xy)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; extrude(Depth-0.02)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comp(f){top : Levels}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NIL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The target is in each repetition the attribute "Factor" to be smaller than the previous one. So, the higher the floor, the smaller the size becomes exponentially.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: it should work as I want it with &lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;attr Depth = 0.1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2016 16:52:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/exponentially-changing-attribute-in-a-function-in/m-p/412280#M5638</guid>
      <dc:creator>GeorgiosAnastasiou</dc:creator>
      <dc:date>2016-07-05T16:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Exponentially changing attribute in a function in CGA rule</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/exponentially-changing-attribute-in-a-function-in/m-p/412281#M5639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You mean something like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;attr RowRow = 2
attr Expo = 2
attr HoldMe = 0

Lot --&amp;gt;
extrude(5)
color (1,1,0)
print("----------")
DoTheThing

DoTheThing --&amp;gt;
case Expo &amp;gt; 10: EndThis
else: GoGo

GoGo --&amp;gt;
print("Expo old: " + Expo)
set(HoldMe,pow(RowRow, Expo))
set(Expo, Expo+1)
print("Expo new: " + Expo)
print("Exponential!: " + HoldMe)
print("--")
DoTheThing

EndThis --&amp;gt;
#important
print(":D-/-&amp;lt;")
print(":D-\\-&amp;lt;")
print(":D-/-&amp;lt;")
print(":D-\\-&amp;lt;")
print(":D-/-&amp;lt;")
print(":D-\\-&amp;lt;")
print(":D-/-&amp;lt;")
print(":D-\\-&amp;lt;")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:42:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/exponentially-changing-attribute-in-a-function-in/m-p/412281#M5639</guid>
      <dc:creator>LR</dc:creator>
      <dc:date>2021-12-11T18:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: Exponentially changing attribute in a function in CGA rule</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/exponentially-changing-attribute-in-a-function-in/m-p/412282#M5640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That was very useful, and by following the log in CGA console I understood exactly how it works.&lt;/P&gt;&lt;P&gt;I found exactly what I needed: the "set" operation to change the attribute inside the function, and the exponential growth of the value, in this case by using the "pow" (power) operation.&lt;/P&gt;&lt;P&gt;Thank you very much Z R!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2016 15:01:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/exponentially-changing-attribute-in-a-function-in/m-p/412282#M5640</guid>
      <dc:creator>GeorgiosAnastasiou</dc:creator>
      <dc:date>2016-07-07T15:01:01Z</dc:date>
    </item>
  </channel>
</rss>

