class_docstr: A Truss is an assembly of members such as beams,
  connected by nodes, that create a rigid structure.
  In engineering, a truss is a structure that
  consists of two-force members only.
  
  Trusses are extremely important in engineering applications
  and can be seen in numerous real-world applications like bridges.
  
  Examples
  ========
  
  There is a Truss consisting of four nodes and five
  members connecting the nodes. A force P acts
  downward on the node D and there also exist pinned
  and roller joints on the nodes A and B respectively.
  
  .. image:: truss_example.png
  
  >>> from sympy.physics.continuum_mechanics.truss import Truss
  >>> t = Truss()
  >>> t.add_node(("node_1", 0, 0), ("node_2", 6, 0), ("node_3", 2, 2), ("node_4", 2, 0))
  >>> t.add_member(("member_1", "node_1", "node_4"), ("member_2", "node_2", "node_4"), ("member_3", "node_1", "node_3"))
  >>> t.add_member(("member_4", "node_2", "node_3"), ("member_5", "node_3", "node_4"))
  >>> t.apply_load(("node_4", 10, 270))
  >>> t.apply_support(("node_1", "pinned"), ("node_2", "roller"))
docstr: Returns a plot object of the Truss with all its nodes, members,
  supports and loads.
  
  .. note::
      The user must be careful while entering load values in their
      directions. The draw function assumes a sign convention that
      is used for plotting loads.
  
      Given a right-handed coordinate system with XYZ coordinates,
      the supports are assumed to be such that the reaction forces of a
      pinned support is in the +X and +Y direction while those of a
      roller support is in the +Y direction. For the load, the range
      of angles, one can input goes all the way to 360 degrees which, in the
      the plot is the angle that the load vector makes with the positive x-axis in the anticlockwise direction.
  
      For example, for a 90-degree angle, the load will be a vertically
      directed along +Y while a 270-degree angle denotes a vertical
      load as well but along -Y.
  
  Examples
  ========
  
  .. plot::
      :context: close-figs
      :format: doctest
      :include-source: True
  
      >>> from sympy.physics.continuum_mechanics.truss import Truss
      >>> import math
      >>> t = Truss()
      >>> t.add_node(("A", -4, 0), ("B", 0, 0), ("C", 4, 0), ("D", 8, 0))
      >>> t.add_node(("E", 6, 2/math.sqrt(3)))
      >>> t.add_node(("F", 2, 2*math.sqrt(3)))
      >>> t.add_node(("G", -2, 2/math.sqrt(3)))
      >>> t.add_member(("AB","A","B"), ("BC","B","C"), ("CD","C","D"))
      >>> t.add_member(("AG","A","G"), ("GB","G","B"), ("GF","G","F"))
      >>> t.add_member(("BF","B","F"), ("FC","F","C"), ("CE","C","E"))
      >>> t.add_member(("FE","F","E"), ("DE","D","E"))
      >>> t.apply_support(("A","pinned"), ("D","roller"))
      >>> t.apply_load(("G", 3, 90), ("E", 3, 90), ("F", 2, 90))
      >>> p = t.draw()
      >>> p  # doctest: +ELLIPSIS
      Plot object containing:
      [0]: cartesian line: 1 for x over (1.0, 1.0)
      ...
      >>> p.show()
docstr_tok: ["Returns","a","plot","object","of","the","Truss","with","all","its","nodes",",","members",",","supports","and","loads",".","..","note",":",":","The","user","must","be","careful","while","entering","load","values","in","their","directions",".","The","draw","function","assumes","a","sign","convention","that","is","used","for","plotting","loads",".","Given","a","right-handed","coordinate","system","with","XYZ","coordinates",",","the","supports","are","assumed","to","be","such","that","the","reaction","forces","of","a","pinned","support","is","in","the","+X","and","+Y","direction","while","those","of","a","roller","support","is","in","the","+Y","direction",".","For","the","load",",","the","range","of","angles",",","one","can","input","goes","all","the","way","to","360","degrees","which",",","in","the","the","plot","is","the","angle","that","the","load","vector","makes","with","the","positive","x-axis","in","the","anticlockwise","direction",".","For","example",",","for","a","90-degree","angle",",","the","load","will","be","a","vertically","directed","along","+Y","while","a","270-degree","angle","denotes","a","vertical","load","as","well","but","along","-Y",".","Examples","========","..","plot",":",":",":","context",":","close-figs",":","format",":","doctest",":","include-source",":","True",">",">",">","from","sympy.physics.continuum_mechanics.truss","import","Truss",">",">",">","import","math",">",">",">","t","=","Truss","(",")",">",">",">","t.add_node","(","(","``","A","''",",","-4",",","0",")",",","(","``","B","''",",","0",",","0",")",",","(","``","C","''",",","4",",","0",")",",","(","``","D","''",",","8",",","0",")",")",">",">",">","t.add_node","(","(","``","E","''",",","6",",","2\/math.sqrt","(","3",")",")",")",">",">",">","t.add_node","(","(","``","F","''",",","2",",","2","*","math.sqrt","(","3",")",")",")",">",">",">","t.add_node","(","(","``","G","''",",","-2",",","2\/math.sqrt","(","3",")",")",")",">",">",">","t.add_member","(","(","``","AB","''",",","''","A","''",",","''","B","''",")",",","(","``","BC","''",",","''","B","''",",","''","C","''",")",",","(","``","CD","''",",","''","C","''",",","''","D","''",")",")",">",">",">","t.add_member","(","(","``","AG","''",",","''","A","''",",","''","G","''",")",",","(","``","GB","''",",","''","G","''",",","''","B","''",")",",","(","``","GF","''",",","''","G","''",",","''","F","''",")",")",">",">",">","t.add_member","(","(","``","BF","''",",","''","B","''",",","''","F","''",")",",","(","``","FC","''",",","''","F","''",",","''","C","''",")",",","(","``","CE","''",",","''","C","''",",","''","E","''",")",")",">",">",">","t.add_member","(","(","``","FE","''",",","''","F","''",",","''","E","''",")",",","(","``","DE","''",",","''","D","''",",","''","E","''",")",")",">",">",">","t.apply_support","(","(","``","A","''",",","''","pinned","''",")",",","(","``","D","''",",","''","roller","''",")",")",">",">",">","t.apply_load","(","(","``","G","''",",","3",",","90",")",",","(","``","E","''",",","3",",","90",")",",","(","``","F","''",",","2",",","90",")",")",">",">",">","p","=","t.draw","(",")",">",">",">","p","#","doctest",":","+ELLIPSIS","Plot","object","containing",":","[","0","]",":","cartesian","line",":","1","for","x","over","(","1.0",",","1.0",")","...",">",">",">","p.show","(",")"]
code: def draw(self, subs_dict=None):
      """
      Returns a plot object of the Truss with all its nodes, members,
      supports and loads.
  
      .. note::
          The user must be careful while entering load values in their
          directions. The draw function assumes a sign convention that
          is used for plotting loads.
  
          Given a right-handed coordinate system with XYZ coordinates,
          the supports are assumed to be such that the reaction forces of a
          pinned support is in the +X and +Y direction while those of a
          roller support is in the +Y direction. For the load, the range
          of angles, one can input goes all the way to 360 degrees which, in the
          the plot is the angle that the load vector makes with the positive x-axis in the anticlockwise direction.
  
          For example, for a 90-degree angle, the load will be a vertically
          directed along +Y while a 270-degree angle denotes a vertical
          load as well but along -Y.
  
      Examples
      ========
  
      .. plot::
          :context: close-figs
          :format: doctest
          :include-source: True
  
          >>> from sympy.physics.continuum_mechanics.truss import Truss
          >>> import math
          >>> t = Truss()
          >>> t.add_node(("A", -4, 0), ("B", 0, 0), ("C", 4, 0), ("D", 8, 0))
          >>> t.add_node(("E", 6, 2/math.sqrt(3)))
          >>> t.add_node(("F", 2, 2*math.sqrt(3)))
          >>> t.add_node(("G", -2, 2/math.sqrt(3)))
          >>> t.add_member(("AB","A","B"), ("BC","B","C"), ("CD","C","D"))
          >>> t.add_member(("AG","A","G"), ("GB","G","B"), ("GF","G","F"))
          >>> t.add_member(("BF","B","F"), ("FC","F","C"), ("CE","C","E"))
          >>> t.add_member(("FE","F","E"), ("DE","D","E"))
          >>> t.apply_support(("A","pinned"), ("D","roller"))
          >>> t.apply_load(("G", 3, 90), ("E", 3, 90), ("F", 2, 90))
          >>> p = t.draw()
          >>> p  # doctest: +ELLIPSIS
          Plot object containing:
          [0]: cartesian line: 1 for x over (1.0, 1.0)
          ...
          >>> p.show()
      """
      if not numpy:
          raise ImportError(
              "To use this function numpy module is required"
          )
  
      x = Symbol("x")
  
      markers = []
      annotations = []
      rectangles = []
  
      node_markers = self._draw_nodes(subs_dict)
      markers += node_markers
  
      member_rectangles = self._draw_members()
      rectangles += member_rectangles
  
      support_markers = self._draw_supports()
      markers += support_markers
  
      load_annotations = self._draw_loads()
      annotations += load_annotations
  
      xmax = -INF
      xmin = INF
      ymax = -INF
      ymin = INF
  
      for node in self._node_coordinates:
          xmax = max(xmax, self._node_coordinates[node][0])
          xmin = min(xmin, self._node_coordinates[node][0])
          ymax = max(ymax, self._node_coordinates[node][1])
          ymin = min(ymin, self._node_coordinates[node][1])
  
      lim = max(
          xmax * 1.1 - xmin * 0.8 + 1, ymax * 1.1 - ymin * 0.8 + 1
      )
  
      if lim == xmax * 1.1 - xmin * 0.8 + 1:
          sing_plot = plot(
              1,
              (x, 1, 1),
              markers=markers,
              show=False,
              annotations=annotations,
              xlim=(xmin - 0.05 * lim, xmax * 1.1),
              ylim=(xmin - 0.05 * lim, xmax * 1.1),
              axis=False,
              rectangles=rectangles,
          )
  
      else:
          sing_plot = plot(
              1,
              (x, 1, 1),
              markers=markers,
              show=False,
              annotations=annotations,
              xlim=(ymin - 0.05 * lim, ymax * 1.1),
              ylim=(ymin - 0.05 * lim, ymax * 1.1),
              axis=False,
              rectangles=rectangles,
          )
  
      return sing_plot
  
imports: from cmath import atan, inf
  from sympy.core.add import Add
  from sympy.core.evalf import INF
  from sympy.core.mul import Mul
  from sympy.core.symbol import Symbol
  from sympy.core.sympify import sympify
  from sympy import Matrix, pi
  from sympy.external.importtools import import_module
  from sympy.functions.elementary.miscellaneous import sqrt
  from sympy.matrices.dense import zeros
  import math
  from sympy.physics.units.quantities import Quantity
  from sympy.plotting import plot
  from sympy.utilities.decorator import doctest_depends_on
  from sympy import sin, cos
label_desc: Use image node_id 22 for calling the Truss obj's underlying member method code with example usage: obj.draw(subs_dict) and returns: sing_plot