Is there any lisp to generate all possible geometry from Mathematical formula?

Is there any lisp to generate all possible geometry from Mathematical formula?

SanjoyNath
Advocate Advocate
1,767 Views
8 Replies
Message 1 of 9

Is there any lisp to generate all possible geometry from Mathematical formula?

SanjoyNath
Advocate
Advocate

Dear Experts,

 

 

Sometimes structural engineers (from client)have given us some cross checking tasks to fit and set with truss elements or shape elements (scraps from plates) to reuse these with proper places as and where these fits best.

 

 

Sometimes Architects come up with(Dream that computers can do everything and expects things very fast) and asks us to model truss elements (such that they can put loads on these to check) and outer surfaces in such a way that some given equation (3D surface equation) fulfills the possibility of line segments(mesh like models for structural parts or components)

 

 

 

 

 

refer Geometrifying Trigonometry (our in house struggle to model for attacking such problems)

refer Form Finding references that Structural engineers and these Architects talk about(To prepare plugins to auto model from mathematical equations)

 

 

 

Is there any lisp routine that can show the final line segment (all possible locations of the final line segment in 2D space) generated through a given Trigonometric Equation(Identity) or The Algebraic expression written in excel formula form ?

_____________________________________________________________________________

Lets clarify the points what we could understand from the discussions with architects

 

Suppose we have a given formula (Trigonometric Formula or Algebraic Formula expression in Excel formula style) having several powers of Sin , Cos , Tan etc... which signifies some transformed line segment from given line segment which is not unique in nature.There are several different positions of line segments happen due to multiplication of Trigonometric Ratios and due to other algebraic operations.If we can generate all possible geometric arrangements out of given Trigonometric or Algebraic expressions , then it is easier to choose the best looking and feasible shape out of all these possible options

start_of_ambiguity.png

 

geometrifying_trigonometry_lisping.png

 

locked_set_of_line_segment_objects_for_lisping.png

 

 

 

 

The Locked set of Line segment is modeled to prepare the algorithm computable.Until this was done in proper non ambiguous definition, we could not even think of regenerating the geometric shapes (and possible arrangements) due to application of operators on the starting (initiating) line segment

We tried to represent all Trigonometric Ratios in terms of Automata strings such that excel like formula for Algebraic or Trigonometric formula in some non ambiguous way.Now we need some tool to prepare all possible geometric options as shown here please see the dis ambiguity of this requirementsthe_automata_theory_applying_on_trigonometry.png

 

 

 

 

https://geometrifyin...ng-Trigonometry

 

 

 

 

Sanjoy Nath
BIM Manager And Digital Lead (Structures Online)
BOOST, AR , VR ,EPM,IFC API,PDF API , CAD API ,Revit API , Advance Steel API
Founder of Geometrifying Trigonometry(C)
0 Likes
1,768 Views
8 Replies
Replies (8)
Message 2 of 9

SanjoyNath
Advocate
Advocate

Dear Experts,

 

This is in search for Lisp routine.

There is some other link for this to find readymade software already available or not

https://forums.autodesk.com/t5/autocad-forum/how-can-i-get-all-possible-geometric-shapes-from-given/...

Sanjoy Nath
BIM Manager And Digital Lead (Structures Online)
BOOST, AR , VR ,EPM,IFC API,PDF API , CAD API ,Revit API , Advance Steel API
Founder of Geometrifying Trigonometry(C)
0 Likes
Message 3 of 9

CodeDing
Advisor
Advisor

@SanjoyNath,

 

What you're seemingly trying to accomplish intrigues me. But your explanations are too broad. Perhaps we can try 1 example of an output you are looking for.

Can you maybe provide 1 simple equation? explain it briefly, then show an image of the expected outcome of that simple equation?

 

Best,

~DD

Message 4 of 9

CodeDing
Advisor
Advisor

... to elaborate from my perspective, AutoCAD represents data in a visual manner. This means we need to have clear definitions of the items we create. So a formula that represents Infinite possible outcomes from Infinite possible inputs is not a viable definition to create defined geometry in AutoCAD.

Take the formula Y = X^2...

There are infinite possibilities for X and infinite results for Y. We cannot draw infinite verticies in AutoCAD.

But, when we add some limitations and clear parameters to our formula it becomes more suitable for drawing.

Ex: Y = X^2 (where Xmin = 0, Xmax = 10, and interval = 1)

The above limitations allow us to create a geometry line in Autocad to represent the formula:

image.png

...albeit the line is not a completely accurate representation with our interval, so some level of accuracy must be accepted so that we can clearly define our geometry to create.

If we lower our interval to a small decimal (such as 0.001) then we can more-clearly see our representation:

image.png

...but this is more strenuous on the geometry portion and file sizes. So a medium must be reached.

image.png

So overall, with limitations, formulas can be represented in AutoCAD with Very clear definitions, goals, and acceptable margins of error of our desired outcome.

Code used:

;Draw pline to represent formula:
;Y = X^2
;Xmin = 0
;Xmax = 10
;interval = 0.001

(defun c:FORMULA ( / Xmin Xmax Y interval pList)
(setq Xmin 0
      Xmax 10
      interval 0.001)
(setq X Xmin)
(while (<= X Xmax)
	(setq Y (expt X 2))
	(setq pList (cons (list X Y) pList))
	(setq X (+ X interval))
);while
(setq pList (reverse pList))
(LWPoly pList 0)
(princ)
);defun

(defun LWPoly (lst cls)
(entmakex (append (list (cons 0 "LWPOLYLINE")
                        (cons 100 "AcDbEntity")
                        (cons 100 "AcDbPolyline")
                        (cons 90 (length lst))
                        (cons 70 cls))
                  (mapcar (function (lambda (p) (cons 10 p))) lst))))

Best,

~DD

Message 5 of 9

vladimir_michl
Advisor
Advisor

If you just need to create geometry from a math formula (per your post title), there is e.g. the 2DPlot (or 3DPlot) utility but the description is more about some geometrical problem solving algorithms. It also can be done in AutoCAD but you will need a specific tool for each specific case - there is no general tool.

 

See:

https://www.cadstudio.cz/en/apps/2dplot/

https://www.cadstudio.cz/en/apps/3dplot/

https://www.cadforum.cz/cadforum_en/iterative-move-scale-and-rotate-till-boundary-touch-tip11295

 

Vladimir Michl, www.cadstudio.cz  www.cadforum.cz

 

Message 6 of 9

SanjoyNath
Advocate
Advocate

Dear @vladimir_michl

 

 

These utilities are very good and useful.I have forwarded these links to our top bosses

But it is not handling any Triangulations or Truss related issues

 

This utility is for several documentations and proof mechanisms through Geometrifying Trigonometry(C) Proof Tree Graphs for Pictorial Proof Automation Systems

 

 

 

Thanking

@CodeDing

 

for some good kind of approach done here

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/is-there-any-lisp-routine-to-align-a...

 

 

Sanjoy Nath
BIM Manager And Digital Lead (Structures Online)
BOOST, AR , VR ,EPM,IFC API,PDF API , CAD API ,Revit API , Advance Steel API
Founder of Geometrifying Trigonometry(C)
0 Likes
Message 7 of 9

SanjoyNath
Advocate
Advocate

Dear  @CodeDing

This is Fantastic for graph plotting

But Geometry is picture proof tree

"all possible geometry" is proof tree

http://web.mit.edu/18.098/book/extract2009-01-21.pdf

 

These gives symbolic proofs but not geometric proofs

 

Sanjoy Nath
BIM Manager And Digital Lead (Structures Online)
BOOST, AR , VR ,EPM,IFC API,PDF API , CAD API ,Revit API , Advance Steel API
Founder of Geometrifying Trigonometry(C)
0 Likes
Message 8 of 9

CodeDing
Advisor
Advisor

@SanjoyNath,

 

I am taking a new approach and working toward what I believe you might need. Will need a day or a few days.

 

Best,

~DD

Message 9 of 9

Anonymous
Not applicable

This is all way over my head.  I feel like I understand what you gentlemen are discussing..... but only to an uneducated limited extent.  Were you two able to come up with a " perfect medium" to accomplish what you (Sanjoy) are requesting of acad ?  This is fascinating to say the least.  Mind blowing at best. 

rcw

0 Likes