Tag Info

New answers tagged

0

Your problem is ill-defined, since the notion of a point "along" and edge is not clear (or at least you have not defined it). Setting the convex hull vertices as the points along the outer edge is arbitrary, however, it is a logical approach (from a visual perspective, at least). Inspired by this approach, I will define the points along the inner edge as ...


2

I managed to figure out how to re-implement AnglePath[], since I needed to do something turtle-related for a friend, and I still do not have access to a computer with version 10. First, the special cases: anglePath[steps_] := anglePath[{{0, 0}, 0}, steps] anglePath[p_?VectorQ, steps_] := anglePath[{p, 0}, steps] anglePath[alpha0_, steps_] := anglePath[{{0, ...


1

Here is an attempt to use MichaelE2's method 2 but only using built-in functions with no need to load the FEM package. tscale = 4; θscale = 0.5; domain = DiscretizeRegion[FullRegion[2], {{0, tscale}, {0, θscale}}, MaxCellMeasure -> {"Area" -> 0.0005}] coords = g[4 Pi #1/tscale, 2 Pi #2/θscale] & @@@ ...


4

Do you wan the entire area enclosed by the outer envelope? A bit brute force, but note the 10-fold symmetry, so that only two arc segments define the outer boundary: base = Line@Table[ curve02, {\[Tau], 0, 5 Pi, Pi/1000}]; r1 = FindRoot[ (curve02 /. \[Tau] -> x) == (curve02 /. \[Tau] -> y), {x, .5}, {y, 5.5}]; p1 = y /. FindRoot[ (ArcTan @@ ...


3

I may have missed the point but I post out of interest. p = ParametricPlot[curve02, {\[Tau], 0, 5 Pi}] c[t_] := curve02 /. \[Tau] -> t point = SortBy[c /@ Range[0, 5 Pi, 0.001], Norm]; Manipulate[ ListPlot[point[[1 ;; n]], AspectRatio -> Automatic], {n, 1, 15000, 1}] The manipulate allows to get "interior" Getting desired points: points = ...


3

Motivation In Mathematica most curves are ultimately rendered using Line, which has a straightforward derivative. Therefore it makes sense to create a function that solves the problem for the particular case of a Line object. For example pts = Flatten[Cases[Plot[Sin[x], {x, 0, 2 Pi}], Line[pts_] :> pts, Infinity], 1]; is the list of points which make ...


8

With your figure l1 = Line[{{0, 1}, {1, 1}}]; cir = Circle[{1, 0}, 1, {-π/2, π]/2}]; l2 = Line[{{0, -1}, {1, -1}}]; geom = {l1, cir, l2}; g = Graphics[geom]; and the rectangle marker l = 0; hw = 0.01; hh = 0.05; marker = Rasterize@Magnify[Graphics@Rectangle[{l - hw, hh}, {l + hw, -hh}], 0.07] one can create a binary image from the figure bg = ...


8

RegionMeasure chooses a method which is slow when exact non-rational coefficients are present. I will correct this for a future version. Thanks for pointing it out. In Mathematica 10 the example works fast with approximate coefficients. In[1]:= Timing@RegionMeasure@N@ RegionIntersection[ Tetrahedron[{{0, 0, Sqrt[3/2]}, {2/Sqrt[3], 0, ...


6

Some of this code is based on the last example of the docs on GradientOrientationFilter You can also smooth out the resulting path and reparametrize the interpolation based on the curve length to get a "constant velocity" displacement for the rectangle- l1 = Line[{{0, 1}, {1, 1}}]; cir = Circle[{1, 0}, 1, {-π/2, π/2}]; l2 = Line[{{0, -1}, {1, -1}}]; geom = ...



Top 50 recent answers are included