I have the following Problem:
I need a discretized amount of points in a 3D-volume. These points satisfy a condition to built-up a 3D-geometry.
In my example below I selected a helical geometry. The way I found a solution doing the above mentioned is: 1. analytically defining the 3D-volume and Helix function - 2. discretizing
I was wondering if the problem might be easier solved (especially I expierence problems defining the exact functions and limiters for even more complex geometries). I guess discretizing the volume first and checking which Point lie in the desired volume might be easier. However, I do not have a clue, how to do so. Any hints?
I appreciate even simpler ideas!!
(* --- Helix parameters --- *)
HelixRadius = 0.1;
HelixPitch = 0.5;
WireWidth = 0.05;
WireThick = 0.02;
(* --- Defining Volume of interest --- *)
xMin = -0.5;
xMax = 0.5;
Δx = ResXY;
yMin = -0.5;
yMax = 0.5;
Δy = ResXY;
zMin = -0.5;
zMax = 0.5;
Δz = WireThick;
(* --- Resolution for discretization --- *)
ResXY = 0.01;
(* --- Limiters to build-up Helix --- *)
m = HelixPitch/(2 π);
rMin = HelixRadius - WireWidth/2;
rMax = HelixRadius + WireWidth/2;
kMin = 0; (* switches # of helix turnes integerwise *)
kMax = 0; (* switches # of helix turnes integerwise *)
(* --- Functions defining Helix geometry --- *)
RadiusFunction = Sqrt[x^2 + y^2];
Zfunction =
Piecewise[{{m (ArcTan[x/y] + π/2 + k 2 π) - HelixPitch/2,
y < 0}, {m (ArcTan[x/y] + 3 π/2 + k 2 π) - HelixPitch/2,
y > 0}}, k 2 π];
(* --- Locating Functions to Upper and Lower Limiters --- *)
condition =
rMin <= RadiusFunction <= rMax && zMin <= Zfunction <= zMax;
(* --- In table form: coordinates satisfying the above condition and \
wrapping a cuboid around --- *)
tab = Table[
If[condition ,
Cuboid[{x, y,
Zfunction} - {Δx/2, Δy/
2, Δz/2}, {x, y,
Zfunction} + {Δx/2, Δy/
2, Δz/2}], {}], {x, xMin,
xMax, Δx}, {y, yMin, yMax, Δy}, {k,
kMin, kMax}];
(* --- Ploting result in 3D --- *)
PlotCuboids =
Graphics3D[tab, Axes -> True, AxesLabel -> {"X", "Y", "Z"}]







Graphics'Mesh'PointWindingNumber. I do not find any Information in the help what this is doing... – Kay Jan 08 '16 at 08:55Kay. I put some additional references which you may find helpful. – Sumit Jan 08 '16 at 10:01NOFFin documentation). – Sumit Jan 08 '16 at 10:22