topologicpy.Sun module
- class topologicpy.Sun.Sun
Bases:
objectMethods
Altitude(latitude, longitude, date)Returns the Altitude angle.
AutumnEquinox(latitude, year)Returns the autumnal equinox date for the input latitude and year.
Azimuth(latitude, longitude, date)Returns the Azimuth angle.
Diagram(latitude, longitude[, ...])Returns the sun diagram based on the input parameters.
Edge(latitude, longitude, date[, origin, ...])Returns the Sun as a vector.
PathByDate(latitude, longitude, date[, ...])Returns the sun path based on the input parameters.
PathByHour(latitude, longitude, hour[, ...])Returns the sun locations based on the input parameters.
Position(latitude, longitude, date[, ...])Returns the Sun as a position ([X,Y,Z]).
SpringEquinox(latitude, year)Returns the spring (vernal) equinox date for the input latitude and year.
SummerSolstice(latitude, year)Returns the winter solstice date for the input latitude and year.
Sunrise(latitude, longitude, date)Returns the Sunrise datetime.
Sunset(latitude, longitude, date)Returns the Sunset datetime.
Vector(latitude, longitude, date[, north])Returns the Sun as a vector.
Vertex(latitude, longitude, date[, origin, ...])Returns the Sun as a vertex.
VerticesByDate(latitude, longitude, date[, ...])Returns the Sun locations as vertices based on the input parameters.
VerticesByHour(latitude, longitude, hour[, ...])Returns the sun locations based on the input parameters.
WinterSolstice(latitude[, year])Returns the winter solstice date for the input latitude and year.
- static Altitude(latitude, longitude, date)
Returns the Altitude angle. See https://en.wikipedia.org/wiki/Altitude.
- Parameters
- latitudefloat
The input latitude. See https://en.wikipedia.org/wiki/Latitude.
- longitudefloat
The input longitude. See https://en.wikipedia.org/wiki/Longitude.
- datedatetime
The input datetime.
- Returns
- float
The altitude angle.
- static AutumnEquinox(latitude, year)
Returns the autumnal equinox date for the input latitude and year. See https://en.wikipedia.org/wiki/September_equinox.
- Parameters
- latitudefloat
The input latitude. See https://en.wikipedia.org/wiki/Latitude.
- yearinteger , optional
The input year. Default is the current year.
- Returns
- datetime
The datetime of the summer solstice
- static Azimuth(latitude, longitude, date)
Returns the Azimuth angle. See https://en.wikipedia.org/wiki/Azimuth.
- Parameters
- latitudefloat
The input latitude. See https://en.wikipedia.org/wiki/Latitude.
- longitudefloat
The input longitude. See https://en.wikipedia.org/wiki/Longitude.
- datedatetime
The input datetime.
- Returns
- float
The azimuth angle.
- static Diagram(latitude, longitude, minuteInterval=30, dayInterval=15, origin=None, radius=0.5, uSides=180, vSides=180, north=0, compass=False, shell=False)
Returns the sun diagram based on the input parameters. See https://hyperfinearchitecture.com/how-to-read-sun-path-diagrams/.
- Parameters
- latitudefloat
The input latitude. See https://en.wikipedia.org/wiki/Latitude.
- longitudefloat
The input longitude. See https://en.wikipedia.org/wiki/Longitude.
- minuteIntervalint , optional
The interval in minutes to compute the sun location for the date path. Default is 30.
- dayIntervalint , optional
The interval in days for the hourly path to compute the sun location. Default is 15.
- origintopologic_core.Vertex , optional
The desired origin of the world. If set to None, the origin will be set to (0,0,0). Default is None.
- radiusfloat , optional
The desired radius of the sun orbit. Default is 0.5.
- uSidesint , optional
The number of sides to divide the diagram horizontally (along the azimuth). Default is 180.
- vSidesint , optional
The number of sides to divide the diagram paths vertically (along the altitude). Default is 180.
- northfloat, optional
The desired compass angle of the north direction. Default is 0 which points in the positive Y-axis direction.
- compassbool , optional
If set to True, a compass (shell) is included. Othwerwise, it is is not.
- shellbool , optional
If set to True, the total surface (shell) of the sun paths is incldued. Otherwise, it is not.
- Returns
- dict
A dictionary of the sun diagram shapes. The keys in this dictionary are: ‘date_paths’: These are the sun paths (wire) for the winter solstice, equinox, and summer solstice ‘hourly_paths’: These are the figure-8 (wire) for the sun location on the same hour on each selected day of the year. ‘shell’: This is the total surface (shell) of the sun paths. This is included only if the shell option is set to True. ‘compass’: This is the compass (shell) on the ground. It is made of 36 sides and 10 rings. This is included only if the compass option is set to True. ‘center’ : This is a cross-shape (wire) at the center of the diagram. This is included only if the compass option is set to True. ‘ground’ : This is a circle (face) on the ground. It is made of 36 sides. This is included only if the compass option is set to False.
- static Edge(latitude, longitude, date, origin=None, radius=0.5, north=0)
Returns the Sun as a vector.
- Parameters
- latitudefloat
The input latitude. See https://en.wikipedia.org/wiki/Latitude.
- longitudefloat
The input longitude. See https://en.wikipedia.org/wiki/Longitude.
- datedatetime
The input datetime.
- origintopologic_core.Vertex , optional
The desired origin of the world. If set to None, the origin will be set to (0,0,0). Default is None.
- radiusfloat , optional
The desired radius of the sun orbit. Default is 0.5.
- northfloat, optional
The desired compass angle of the north direction. Default is 0 which points in the positive Y-axis direction.
- Returns
- topologic_core.Edge
The sun represented as an edge pointing from the location of the sun towards the origin.
- static PathByDate(latitude, longitude, date, startTime=None, endTime=None, interval=60, origin=None, radius=0.5, sides=None, north=0)
Returns the sun path based on the input parameters.
- Parameters
- latitudefloat
The input latitude. See https://en.wikipedia.org/wiki/Latitude.
- longitudefloat
The input longitude. See https://en.wikipedia.org/wiki/Longitude.
- datedatetime
The input datetime.
- startTimedatetime , optional
The desired start time to compute the sun location. If set to None, Sun.Sunrise is used. Default is None.
- endTimedatetime , optional
The desired end time to compute the sun location. If set to None, Sun.Sunset is used. Default is None.
- intervalint , optional
The interval in minutes to compute the sun location. Default is 60.
- origintopologic_core.Vertex , optional
The desired origin of the world. If set to None, the origin will be set to (0,0,0). Default is None.
- radiusfloat , optional
The desired radius of the sun orbit. Default is 0.5.
- sidesint , optional
If set to None, the path is divided based on the interval. Otherwise, it is equally divided into the number of sides. The default is None.
- northfloat, optional
The desired compass angle of the north direction. Default is 0 which points in the positive Y-axis direction.
- Returns
- topologic_core.Wire
The sun path represented as a wire.
- static PathByHour(latitude, longitude, hour, startDay=1, endDay=365, interval=5, origin=None, radius=0.5, sides=None, north=0)
Returns the sun locations based on the input parameters.
- Parameters
- latitudefloat
The input latitude. See https://en.wikipedia.org/wiki/Latitude.
- longitudefloat
The input longitude. See https://en.wikipedia.org/wiki/Longitude.
- hourdatetime
The input hour.
- startDayinteger , optional
The desired start day of the year to compute the sun location. Default is 1.
- endDayinteger , optional
The desired end day of the year to compute the sun location. Default is 365.
- intervalint , optional
The interval in days to compute the sun location. Default is 5.
- origintopologic_core.Vertex , optional
The desired origin of the world. If set to None, the origin will be set to (0,0,0). Default is None.
- radiusfloat , optional
The desired radius of the sun orbit. Default is 0.5.
- sidesint , optional
If set to None, the path is divided based on the interval. Otherwise, it is equally divided into the number of sides. The default is None.
- northfloat, optional
The desired compass angle of the north direction. Default is 0 which points in the positive Y-axis direction.
- Returns
- topologic_core.Wire
The sun path represented as a topologic wire.
- static Position(latitude, longitude, date, origin=None, radius=0.5, north=0, mantissa=6)
Returns the Sun as a position ([X,Y,Z]).
- Parameters
- latitudefloat
The input latitude. See https://en.wikipedia.org/wiki/Latitude.
- longitudefloat
The input longitude. See https://en.wikipedia.org/wiki/Longitude.
- datedatetime
The input datetime.
- origintopologic_core.Vertex , optional
The desired origin of the world. If set to None, the origin will be set to (0,0,0). Default is None.
- radiusfloat , optional
The desired radius of the sun orbit. Default is 0.5.
- northfloat, optional
The desired compass angle of the north direction. Default is 0 which points in the positive Y-axis direction.
- mantissaint , optional
The number of decimal places to round the result to. Default is 6.
- Returns
- topologic_core.Vertex
The sun represented as a vertex.
- static SpringEquinox(latitude, year)
Returns the spring (vernal) equinox date for the input latitude and year. See https://en.wikipedia.org/wiki/March_equinox.
- Parameters
- latitudefloat
The input latitude.
- yearinteger , optional
The input year. Default is the current year.
- Returns
- datetime
The datetime of the summer solstice
- static SummerSolstice(latitude, year)
Returns the winter solstice date for the input latitude and year. See https://en.wikipedia.org/wiki/Summer_solstice.
- Parameters
- latitudefloat
The input latitude.
- yearinteger , optional
The input year. Default is the current year.
- Returns
- datetime
The datetime of the summer solstice
- static Sunrise(latitude, longitude, date)
Returns the Sunrise datetime.
- Parameters
- latitudefloat
The input latitude. See https://en.wikipedia.org/wiki/Latitude.
- longitudefloat
The input longitude. See https://en.wikipedia.org/wiki/Longitude.
- datedatetime
The input datetime.
- Returns
- datetime
The Sunrise datetime.
- static Sunset(latitude, longitude, date)
Returns the Sunset datetime.
- Parameters
- latitudefloat
The input latitude. See https://en.wikipedia.org/wiki/Latitude.
- longitudefloat
The input longitude. See https://en.wikipedia.org/wiki/Longitude.
- datedatetime
The input datetime.
- Returns
- datetime
The Sunset datetime.
- static Vector(latitude, longitude, date, north=0)
Returns the Sun as a vector.
- Parameters
- latitudefloat
The input latitude. See https://en.wikipedia.org/wiki/Latitude.
- longitudefloat
The input longitude. See https://en.wikipedia.org/wiki/Longitude.
- datedatetime
The input datetime.
- northfloat, optional
The desired compass angle of the north direction. Default is 0 which points in the positive Y-axis direction.
- Returns
- list
The sun vector pointing from the location of the sun towards the origin.
- static Vertex(latitude, longitude, date, origin=None, radius=0.5, north=0)
Returns the Sun as a vertex.
- Parameters
- latitudefloat
The input latitude. See https://en.wikipedia.org/wiki/Latitude.
- longitudefloat
The input longitude. See https://en.wikipedia.org/wiki/Longitude.
- datedatetime
The input datetime.
- origintopologic_core.Vertex , optional
The desired origin of the world. If set to None, the origin will be set to (0,0,0). Default is None.
- radiusfloat , optional
The desired radius of the sun orbit. Default is 0.5.
- northfloat, optional
The desired compass angle of the north direction. Default is 0 which points in the positive Y-axis direction.
- Returns
- topologic_core.Vertex
The sun represented as a vertex.
- static VerticesByDate(latitude, longitude, date, startTime=None, endTime=None, interval=60, origin=None, radius=0.5, north=0)
Returns the Sun locations as vertices based on the input parameters.
- Parameters
- latitudefloat
The input latitude. See https://en.wikipedia.org/wiki/Latitude.
- longitudefloat
The input longitude. See https://en.wikipedia.org/wiki/Longitude.
- datedatetime
The input datetime.
- startTimedatetime , optional
The desired start time to compute the sun location. If set to None, Sun.Sunrise is used. Default is None.
- endTimedatetime , optional
The desired end time to compute the sun location. If set to None, Sun.Sunset is used. Default is None.
- intervalint , optional
The interval in minutes to compute the sun location. Default is 60.
- origintopologic_core.Vertex , optional
The desired origin of the world. If set to None, the origin will be set to (0,0,0). Default is None.
- radiusfloat , optional
The desired radius of the sun orbit. Default is 0.5.
- northfloat, optional
The desired compass angle of the north direction. Default is 0 which points in the positive Y-axis direction.
- Returns
- list
The sun locations represented as a list of vertices.
- static VerticesByHour(latitude, longitude, hour, startDay=1, endDay=365, interval=5, origin=None, radius=0.5, north=0)
Returns the sun locations based on the input parameters.
- Parameters
- latitudefloat
The input latitude. See https://en.wikipedia.org/wiki/Latitude.
- longitudefloat
The input longitude. See https://en.wikipedia.org/wiki/Longitude.
- hourdatetime
The input hour.
- startDayinteger , optional
The desired start day to compute the sun location. Default is 1.
- endDayinteger , optional
The desired end day to compute the sun location. Default is 365.
- intervalint , optional
The interval in days to compute the sun location. Default is 5.
- origintopologic_core.Vertex , optional
The desired origin of the world. If set to None, the origin will be set to (0,0,0). Default is None.
- radiusfloat , optional
The desired radius of the sun orbit. Default is 0.5.
- northfloat, optional
The desired compass angle of the north direction. Default is 0 which points in the positive Y-axis direction.
- Returns
- list
The sun locations represented as a list of vertices.
- static WinterSolstice(latitude, year=None)
Returns the winter solstice date for the input latitude and year. See https://en.wikipedia.org/wiki/Winter_solstice.
- Parameters
- latitudefloat
The input latitude.
- yearinteger , optional
The input year. Default is the current year.
- Returns
- datetime
The datetime of the winter solstice