{"id":319,"date":"2021-02-08T13:45:40","date_gmt":"2021-02-08T04:45:40","guid":{"rendered":"https:\/\/mathcadbimthingys.technikstudio.com\/?p=319"},"modified":"2021-02-08T13:48:16","modified_gmt":"2021-02-08T04:48:16","slug":"artichoke-and-resuming-revit-api-development-part-1","status":"publish","type":"post","link":"https:\/\/mathcadbimthingys.technikstudio.com\/index.php\/2021\/02\/08\/artichoke-and-resuming-revit-api-development-part-1\/","title":{"rendered":"Artichoke, and resuming Revit API development &#8211; Part 1"},"content":{"rendered":"\n<p>It has been a very long time since I last posted. It was a very busy period and it is just this time that I got myself a time to do new post.<\/p>\n\n\n\n<p>Very recently, I pursued a temporary work through Upwork that uses my Revit API development abilities. Fortunately, I was able to pull off the project with little revisions after testing. It was a difficult project however because I have to create algorithms and comply to all the requirements they need, which Revit API alone cannot provide.<\/p>\n\n\n\n<p>But I somehow need to rest for a few weeks before I resume another set of projects coming from the country where I am now.<\/p>\n\n\n\n<p>I am so happy to be back to developing programs with Revit API.<\/p>\n\n\n\n<p>And so with Dynamo packages. That is why I made major updates to Rutabaga and created a new package named Artichoke.<\/p>\n\n\n\n<p>Artichoke is just a package used for those who like to experiment on much sophisticated mathematics like calculus, Fourier, 1\/f spectrum, intermittent chaos and quaternions (yes, quaternions)! This package uses <em>MathNet.Numerics<\/em> and <em>MathNet.Symbolics<\/em>. Before, the Fourier nodes were included in Rutabaga. But since I want to dedicate Artichoke to all mathematical nodes that I made and will make, I removed the Fourier nodes from Rutabaga (and I will update this later in the Dynamo Packages) and transferred them to Artichoke.<\/p>\n\n\n\n<p>To explain what Artichoke does, let us start with the Calculus nodes.<\/p>\n\n\n\n<p>Calculus has four nodes, namely:<\/p>\n\n\n\n<p><strong>DerivativeFirst <\/strong>= acquires the first derivative of the equation passed through and get the value from the differentiated equation.<br><strong>Derivative<\/strong> = gets the value of the derivative of the equation passed in a certain order.<br><strong>PartialDerivativeBi<\/strong> = acquires the value from the partial derivative of an equation with two variables, on a certain order and which index should be set constant (0 for x and 1 for y).<br><strong>IntegralDefinite<\/strong> = acquires the value from the definite integral of the equation passed.<\/p>\n\n\n\n<p>All the nodes must have equations (that are strings) that only have one variable named &#8216;x&#8217;, except for <strong>PartialDerivateBi<\/strong> that requires two variables named &#8216;x&#8217; and &#8216;y&#8217;. These are the only conditions for using these nodes.<\/p>\n\n\n\n<p>To set the right notation for the equation needed by the nodes, we do it this way. Let us say you have an equation like<\/p>\n\n\n\n<p>x<sup>3<\/sup> + 3x<sup>2<\/sup> + 6x + 9<\/p>\n\n\n\n<p>The notation for these equations shall look like<\/p>\n\n\n\n<p>x^3+3*x^2+6*x+9<\/p>\n\n\n\n<p>Wherein the caret (^) sign indicates the following number is an exponent to the preceding number, and the multiplication of two numbers must have an asterisk (*) between them.<\/p>\n\n\n\n<p>Bringing this equation to three nodes as shown below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/mathcadbimthingys.technikstudio.com\/wp-content\/uploads\/2021\/02\/artichoke-calculus-1.png\" alt=\"\" class=\"wp-image-323\" width=\"580\" height=\"439\" srcset=\"https:\/\/mathcadbimthingys.technikstudio.com\/wp-content\/uploads\/2021\/02\/artichoke-calculus-1.png 834w, https:\/\/mathcadbimthingys.technikstudio.com\/wp-content\/uploads\/2021\/02\/artichoke-calculus-1-300x227.png 300w, https:\/\/mathcadbimthingys.technikstudio.com\/wp-content\/uploads\/2021\/02\/artichoke-calculus-1-768x582.png 768w\" sizes=\"(max-width: 580px) 100vw, 580px\" \/><figcaption>Calculus nodes on the right, with the given equation on the upper left and other parameters.<\/figcaption><\/figure>\n\n\n\n<p>will give us the solutions and answers in the below image.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"648\" height=\"594\" src=\"https:\/\/mathcadbimthingys.technikstudio.com\/wp-content\/uploads\/2021\/02\/artichoke-calculus-3.png\" alt=\"\" class=\"wp-image-324\" srcset=\"https:\/\/mathcadbimthingys.technikstudio.com\/wp-content\/uploads\/2021\/02\/artichoke-calculus-3.png 648w, https:\/\/mathcadbimthingys.technikstudio.com\/wp-content\/uploads\/2021\/02\/artichoke-calculus-3-300x275.png 300w\" sizes=\"(max-width: 648px) 100vw, 648px\" \/><\/figure>\n\n\n\n<p>Note, however, that there are issues with regards to the rounding off of numbers as results of the  nodes. But, nevertheless, the answers are right.<\/p>\n\n\n\n<p>One good thing when using the <strong>DerivativeFirst<\/strong> node is that it also returns the derivative of the equation as a string value. As of this posting, we can re-use this value to re-evaluate for its derivative. But I have in mind now that it is possible to reiterate this value to what order the derivative is set. So a possible update will come very soon.<\/p>\n\n\n<div id=\"mathc-902067465\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-8734108626422132\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:block;\" data-ad-client=\"ca-pub-8734108626422132\" \ndata-ad-slot=\"\" \ndata-ad-format=\"auto\"><\/ins>\n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div>\n\n\n<p>Next, we look at the partial derivative node.<\/p>\n\n\n\n<p>In the figure below, I am getting the value of the partial derivative in terms of y (which is set here as a boolean to &#8220;false&#8221;).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"994\" height=\"463\" src=\"https:\/\/mathcadbimthingys.technikstudio.com\/wp-content\/uploads\/2021\/02\/artichoke-calculus-4.png\" alt=\"\" class=\"wp-image-326\" srcset=\"https:\/\/mathcadbimthingys.technikstudio.com\/wp-content\/uploads\/2021\/02\/artichoke-calculus-4.png 994w, https:\/\/mathcadbimthingys.technikstudio.com\/wp-content\/uploads\/2021\/02\/artichoke-calculus-4-300x140.png 300w, https:\/\/mathcadbimthingys.technikstudio.com\/wp-content\/uploads\/2021\/02\/artichoke-calculus-4-768x358.png 768w\" sizes=\"(max-width: 994px) 100vw, 994px\" \/><\/figure>\n\n\n\n<p>So the value of the partial derivative based on the conditions given above will be:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"849\" height=\"205\" src=\"https:\/\/mathcadbimthingys.technikstudio.com\/wp-content\/uploads\/2021\/02\/artichoke-calculus-5.png\" alt=\"\" class=\"wp-image-327\" srcset=\"https:\/\/mathcadbimthingys.technikstudio.com\/wp-content\/uploads\/2021\/02\/artichoke-calculus-5.png 849w, https:\/\/mathcadbimthingys.technikstudio.com\/wp-content\/uploads\/2021\/02\/artichoke-calculus-5-300x72.png 300w, https:\/\/mathcadbimthingys.technikstudio.com\/wp-content\/uploads\/2021\/02\/artichoke-calculus-5-768x185.png 768w\" sizes=\"(max-width: 849px) 100vw, 849px\" \/><\/figure>\n\n\n\n<p>Using the same script above but setting the left Boolean node value to <em>True<\/em> will give an answer of <strong>99<\/strong>.<\/p>\n\n\n\n<p>In the next post, I will be discussing about Quaternions using Artichoke.<\/p>\n\n\n\n<p>By the way.<\/p>\n\n\n\n<p>For those of you who are waiting for the updated version of Celery, I am still making things work properly as I am upgrading the package to its new version, in addition with new nodes and new features in some of the nodes. Stay tuned.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It has been a very long time since I last posted. It was a very busy period and it is just this time that I got myself a time to do new post. Very recently, I pursued a temporary work through Upwork that uses my Revit API development abilities. Fortunately, I was able to pull [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":323,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/mathcadbimthingys.technikstudio.com\/index.php\/wp-json\/wp\/v2\/posts\/319"}],"collection":[{"href":"https:\/\/mathcadbimthingys.technikstudio.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mathcadbimthingys.technikstudio.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mathcadbimthingys.technikstudio.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mathcadbimthingys.technikstudio.com\/index.php\/wp-json\/wp\/v2\/comments?post=319"}],"version-history":[{"count":5,"href":"https:\/\/mathcadbimthingys.technikstudio.com\/index.php\/wp-json\/wp\/v2\/posts\/319\/revisions"}],"predecessor-version":[{"id":329,"href":"https:\/\/mathcadbimthingys.technikstudio.com\/index.php\/wp-json\/wp\/v2\/posts\/319\/revisions\/329"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mathcadbimthingys.technikstudio.com\/index.php\/wp-json\/wp\/v2\/media\/323"}],"wp:attachment":[{"href":"https:\/\/mathcadbimthingys.technikstudio.com\/index.php\/wp-json\/wp\/v2\/media?parent=319"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mathcadbimthingys.technikstudio.com\/index.php\/wp-json\/wp\/v2\/categories?post=319"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mathcadbimthingys.technikstudio.com\/index.php\/wp-json\/wp\/v2\/tags?post=319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}