From c79e0c5a71331c31cca0e4a0d575fc8ce0f2a9f8 Mon Sep 17 00:00:00 2001 From: John Tramm Date: Sat, 11 Feb 2017 15:53:28 -0500 Subject: [PATCH] updated documentation on Cone surfaces a little --- docs/build/index.md | 48 ++++++++++++++++---------------- src/ConstructiveSolidGeometry.jl | 2 +- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/docs/build/index.md b/docs/build/index.md index a199c6c..1e6726c 100644 --- a/docs/build/index.md +++ b/docs/build/index.md @@ -32,7 +32,7 @@ An {x,y,z} coordinate type. Used throughout the ConstructiveSolidGeometry.jl pac * `Coord(x::Float64, y::Float64, z::Float64)` -source
+source
# **`ConstructiveSolidGeometry.Surface`** — *Type*. @@ -46,7 +46,7 @@ abstract Surface An abstract class that all surfaces (`Sphere`, `Plane`, `InfCylinder`) inherit from. Implementation of new shapes should inherit from `Surface`. -source
+source
# **`ConstructiveSolidGeometry.Ray`** — *Type*. @@ -64,7 +64,7 @@ A ray is defined by its origin and a unitized direction vector * `Ray(origin::Coord, direction::Coord)` -source
+source
# **`ConstructiveSolidGeometry.Plane`** — *Type*. @@ -89,7 +89,7 @@ Defined by a point on the surface of the plane, its unit normal vector, and an o * `boundary::String`: Optional boundary condition, defined as a `String`. Options are "transmission" (default), "vacuum", and "reflective". -source
+source
# **`ConstructiveSolidGeometry.Sphere`** — *Type*. @@ -114,7 +114,7 @@ Defined by the center of the sphere, its radius, and an optional boundary condit * `boundary::String`: Optional boundary condition, defined as a `String`. Options are "transmission" (default) or "vacuum". -source
+source
# **`ConstructiveSolidGeometry.InfCylinder`** — *Type*. @@ -140,7 +140,7 @@ An arbitrary direction infinite cylinder defined by any point on its central axi * `boundary::String`: Optional boundary condition, defined as a `String`. Options are "transmission" (default) or "vacuum". -source
+source
# **`ConstructiveSolidGeometry.Cone`** — *Type*. @@ -161,12 +161,12 @@ Defined by the tip of the cone, its direction axis vector, the angle between the **Arguments** * `tip::Coord`: The vertex (tip) of the cone - * `axis::Coord`: A unit vector representing the central axis of the cone. The axis vector also indicates which direction the cone points, so should be placed pointing inside of the bounded cone area. Recommended to use `unitize(c::Coord)` if normalizing is needed. + * `axis::Coord`: A unit vector representing the central axis of the cone. As the cone equation actually defines two cones eminating in a mirrored fashion from the tip, this direction vector also indicates which cone is the true cone. I.e., following the direction of the axis vector when starting from the tip should lead inside the cone you actually want. Recommended to use `unitize(c::Coord)` if normalizing is needed. * `theta::Coord`: The angle (in radians) between the central axis (must be between 0 and pi/2) * `boundary::String`: Optional boundary condition, defined as a `String`. Options are "transmission" (default) or "vacuum". -source
+source
# **`ConstructiveSolidGeometry.Box`** — *Type*. @@ -184,7 +184,7 @@ An axis aligned box is defined by the minimum `Coord` and maximum `Coord` of the * `Box(min::Coord, max::Coord)` -source
+source
# **`ConstructiveSolidGeometry.Region`** — *Type*. @@ -207,7 +207,7 @@ The volume that is defined by a surface and one of its halfspaces * `halfspace::Int64`: Either +1 or -1 -source
+source
# **`ConstructiveSolidGeometry.Cell`** — *Type*. @@ -230,7 +230,7 @@ Defined by an array of regions and the logical combination of those regions that * `definition::Expr`: A logical expression that defines the volume of the cell. The intersection operator is ^, the union operator is |, and the complement operator is ~. Regions are defined by their integer indices in the regions array. -source
+source
# **`ConstructiveSolidGeometry.Geometry`** — *Type*. @@ -253,7 +253,7 @@ The top level object that holds all the cells in the problem. This object contai * `bounding_box::Box`: The bounding box around the problem. -source
+source
@@ -272,7 +272,7 @@ magnitude(a::Coord) A utility function to determine the magnitude of a `Coord` object. Typical use case is to subtract two Coord objects and check the resulting Coord object's magnitude to determine the distance between the two Coords. -source
+source
# **`ConstructiveSolidGeometry.unitize`** — *Function*. @@ -286,7 +286,7 @@ unitize(a::Coord) A utility function to unitize a `Coord` -source
+source
# **`ConstructiveSolidGeometry.raytrace`** — *Method*. @@ -305,7 +305,7 @@ Determines if a `Ray` and a `Surface` intersect, and the distance to that inters * `Float64`: The distance between the ray's origin and the point of intersection -source
+source
# **`ConstructiveSolidGeometry.reflect`** — *Method*. @@ -323,7 +323,7 @@ Reflects a ray off a plane. * `Ray`: A new ray with the same origin as input, but with the new reflected direction -source
+source
# **`ConstructiveSolidGeometry.generate_random_ray`** — *Function*. @@ -337,7 +337,7 @@ generate_random_ray(box::Box) Returns a randomly sampled ray from within an axis aligned bounding box. -source
+source
# **`ConstructiveSolidGeometry.find_intersection`** — *Method*. @@ -357,7 +357,7 @@ Performs ray tracing on a Geometry * `String`: The boundary condition of the surface that was hit. -source
+source
# **`ConstructiveSolidGeometry.find_intersection`** — *Method*. @@ -377,7 +377,7 @@ Performs ray tracing on an array of regions. * `String`: The boundary condition of the surface that was hit. -source
+source
# **`ConstructiveSolidGeometry.is_in_cell`** — *Function*. @@ -391,7 +391,7 @@ is_in_cell(p::Coord, cell::Cell) Determines if a point (such as a Ray origin) is inside a given cell -source
+source
# **`ConstructiveSolidGeometry.find_cell_id`** — *Function*. @@ -405,7 +405,7 @@ find_cell_id(p::Coord, geometry::Geometry) Finds the cell id that a point resides within -source
+source
# **`ConstructiveSolidGeometry.plot_geometry_2D`** — *Function*. @@ -425,7 +425,7 @@ Plots a 2D x-y slice of a geometry. * `dim::Int64`: The dimension is the number of pixels along the x and y axis to use, which determines the resolution of the picture. -source
+source
# **`ConstructiveSolidGeometry.plot_cell_2D`** — *Function*. @@ -446,7 +446,7 @@ Plots a 2D x-y slice of a geometry, highlighting a specific cell in black. * `cell_id::Int64`: The index of the cell we wish to view -source
+source
@@ -465,8 +465,8 @@ Plots a 2D x-y slice of a geometry, highlighting a specific cell in black. - [`ConstructiveSolidGeometry.Sphere`](index.md#ConstructiveSolidGeometry.Sphere) - [`ConstructiveSolidGeometry.Surface`](index.md#ConstructiveSolidGeometry.Surface) - [`ConstructiveSolidGeometry.find_cell_id`](index.md#ConstructiveSolidGeometry.find_cell_id) -- [`ConstructiveSolidGeometry.find_intersection`](index.md#ConstructiveSolidGeometry.find_intersection-Tuple{ConstructiveSolidGeometry.Ray,ConstructiveSolidGeometry.Geometry}) - [`ConstructiveSolidGeometry.find_intersection`](index.md#ConstructiveSolidGeometry.find_intersection-Tuple{ConstructiveSolidGeometry.Ray,Array{ConstructiveSolidGeometry.Region,N}}) +- [`ConstructiveSolidGeometry.find_intersection`](index.md#ConstructiveSolidGeometry.find_intersection-Tuple{ConstructiveSolidGeometry.Ray,ConstructiveSolidGeometry.Geometry}) - [`ConstructiveSolidGeometry.generate_random_ray`](index.md#ConstructiveSolidGeometry.generate_random_ray) - [`ConstructiveSolidGeometry.is_in_cell`](index.md#ConstructiveSolidGeometry.is_in_cell) - [`ConstructiveSolidGeometry.magnitude`](index.md#ConstructiveSolidGeometry.magnitude) diff --git a/src/ConstructiveSolidGeometry.jl b/src/ConstructiveSolidGeometry.jl index bc06323..e186af1 100644 --- a/src/ConstructiveSolidGeometry.jl +++ b/src/ConstructiveSolidGeometry.jl @@ -105,7 +105,7 @@ Defined by the tip of the cone, its direction axis vector, the angle between the # Arguments * `tip::Coord`: The vertex (tip) of the cone -* `axis::Coord`: A unit vector representing the central axis of the cone. The axis vector also indicates which direction the cone points, so should be placed pointing inside of the bounded cone area. Recommended to use `unitize(c::Coord)` if normalizing is needed. +* `axis::Coord`: A unit vector representing the central axis of the cone. As the cone equation actually defines two cones eminating in a mirrored fashion from the tip, this direction vector also indicates which cone is the true cone. I.e., following the direction of the axis vector when starting from the tip should lead inside the cone you actually want. Recommended to use `unitize(c::Coord)` if normalizing is needed. * `theta::Coord`: The angle (in radians) between the central axis (must be between 0 and pi/2) * `boundary::String`: Optional boundary condition, defined as a `String`. Options are \"transmission\" (default) or \"vacuum\". """