@@ -91,8 +91,40 @@ Since the magnitude of the segments _OP_ and _OQ_ must be the same, the `FZERO`
9191``` vb
9292x = 3.14410480351349 ; Area = 11 . 6016094276853
9393```
94+ Another problem that can be solved is shown in the figure below.
9495
95- The UDF ` LargestSquareInRATriangle ` is a masterpiece demonstrating the power and versatility offered by the latest versions of VBA Expressions!
96+ ![ Let's prove it!] ( /docs/assets/img/ConceptExample.png )
97+
98+ The code solution for the above problem is
99+
100+ ``` vb
101+ Public Function IncribedCSCcentersDistance(squareSide As Double ) As String
102+ Dim evalHelper As VBAexpressions
103+
104+ Set evalHelper = New VBAexpressions
105+ With evalHelper
106+ .Create "GET('s';" & CStr (squareSide) & ")" : .Eval
107+ .Create "GET('upper.triangle';{{s;0}};{{s;s}};{{0;s}})" , False : .Eval
108+ .Create "GET('lower.triangle';{{0;s}};{{0;-s}};{{s;0}})" , False : .Eval
109+ .Create "GET('ut.inctr';INCENTER(upper.triangle))" , False : .Eval
110+ .Create "GET('lt.inctr';INCENTER(lower.triangle))" , False : .Eval
111+ .Create "GET('inc.dist';ROUND(DISTANCE(ut.inctr;lt.inctr);4))" , False : .Eval
112+ .Create "MROUND(INCIRCLE(upper.triangle);4)" , False : .Eval
113+ Debug.Print "Inscribed upper circle: " & .result
114+ .Create "MROUND(INCIRCLE(lower.triangle);4)" , False : .Eval
115+ Debug.Print "Inscribed lower circle: " & .result
116+ IncribedCSCcentersDistance = .VarValue( "inc.dist" )
117+ End With
118+ End Function
119+ ```
120+ After executing the code, in the console is also printed the inscribed circle center point coordinates and radius magnitudes.
121+
122+ ``` vb
123+ Inscribed upper circle: {{ 8.4853 ;8 . 4853 } ;{ 3 . 5147 ;3 . 5147 }}
124+ Inscribed lower circle: {{ 4.9706 ;0 } ;{ 4 . 9706 ;4 . 9706 }}
125+ ```
126+
127+ These UDF's are masterpieces demonstrating the power and versatility offered by the latest versions of VBA Expressions!
96128
97129## Supported expressions
98130
@@ -325,12 +357,22 @@ End Sub
325357'''
326358''' A={{2;4};{-5;1},{3;-8}};b={{10;-9.5;12}}
327359''' --------------------------------------------------------------------
328- ''' | Solving overdetermined system of equations using least squares and |
360+ ''' | Solving overdetermined system of equations using least squares and |
329361''' | the QR decomposition |
330362''' | |
331363''' | MROUND(LSQRSOLVE(A;b);4) : {{2.6576;-0.1196}} |
332364''' --------------------------------------------------------------------
333365'''
366+ '***********************************GEOMETRICAL FUNCTIONS*******************************************************************************
367+ ''' DISTANCE({{3.1441;0}};{{4.45415;3.1441}}) = 3.40611153847022
368+ ''' LINESINTERSECT({{3.1441;0};{0;1.31004}};{{0;3};{-3;3}}) = {{-4.05590916002565;3}}
369+ ''' PARALLEL({{12;0};{0;5}};{{3.1441;0}}) = {{3.1441;0};{0;1.31004166666667}}
370+ ''' PERPENDICULAR({{12;0};{0;5}};{{0;0}}) = {{0;0};{1.77514792899408;4.2603550295858}}
371+ ''' MROUND(BISECTOR({{-4;-2}};{{-2;6}});4) = {{-3;2};{-2;1.75}}
372+ ''' MROUND(INCENTER({{0;0}};{{-4;-2}};{{-2;6}});4) = {{-1.7982;0.7448}}
373+ ''' MROUND(INCIRCLE({{0;0}};{{-4;-2}};{{-2;6}});4) = {{-1.7982;0.7448};{1.4704;1.4704}}
374+ ''' MROUND(CIRCUMCIRCLE({{0;0}};{{-4;-2}};{{-2;6}});4) = {{-3.5714;2.1429};{4.165;4.165}}
375+ ''' MROUND(CIRCLETANG({{-4;3}};SQRT(17);{{2;5}});4) = {{-2.4387;6.8161};{2;5}};{{2;5};{-0.4613;0.8839}}
334376'***********************************STATISTICAL FUNCTIONS*******************************************************************************
335377''' ROUND(NORM(0.05);8) = 0.96012239
336378''' ROUND(CHISQ(4;15);8) = 0.99773734
@@ -425,7 +467,7 @@ For issues, feature requests, or questions, please use the issue tracker on GitH
425467
426468## Licence
427469
428- Copyright: © ; 2022-2024 [ W. García] ( https://github.com/ws-garcia/ ) .
470+ Copyright: © ; 2022-2025 [ W. García] ( https://github.com/ws-garcia/ ) .
429471
430472This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
431473
0 commit comments