Tag Info

New answers tagged

1

my main problem was that I didn't define all the contractions of Riemann and Ricci tensors. Therefore Mathematica couldn't evaluate the expressions in which it finds other contractions of curvature tensors than the ones defined in the command MetricCompute: Riemann[-1,-1,-1,-1] Riemann[-1,-1,-1,1] .... What I was missing to do was: RicciCD[a, b] // ...


4

A more geometrical approach based on CP3D surface-surface intersections boundary style... inter = ContourPlot3D[{h == 0, g == 0}, {x, -4, 4}, {y, -4, 4}, {t, -4, 4}, Mesh -> None, ContourStyle -> Directive[Orange, Opacity[0.3], Specularity[White, 30]], BoundaryStyle -> {1 -> None, 2 -> None, {1, 2} -> Blue}] reg = ...


4

Rough approximation via plotting V9: One can estimate the length of the polygonal path in the ContourPlot from the graphics. It's a little easier to process if I adapt Daniel Lichtblau's (undocumented?) use of BoundaryStyle in his answer to Plotting implicitly-defined space curves. If the points in the plot lie exactly on the intersection, the length ...


4

Brute force approach: g[y0_] := x /. FindRoot[ Exp[-(x^3 + y)] - 1 == y /. y -> y0 , {x, -4, 4}] line = Table[{g[y], y, y}, {y, -1, 4, .0001}]; Graphics3D[Line@line] Total[Norm@(Subtract @@ #) & /@ Partition[line, 2, 1]] 10.9513


16

Since another answer provides misleading results I'm motivated to explain what's wrong there and suggest a correct solution. One can guess that the error there has been produced by DiscretizeRegion or by an improper parametrization of the curve with RegionIntersection (more likely the former reason). Let's start from the begining defining the following ...


9

Thanks to Artes for helping me sort out bugs in this answer. Solve[E^(-x^3 - y) - 1 - y == 0, y] {{y -> -1 + ProductLog[E^(1 - x^3)]}} To account for that fact that $-4 < y = z < 4$ we need to find the range of allowed $x$ values. FindRoot[-1 + ProductLog[E^(1 - x^3)] == 4, {x, 1}] {x -> -1.77681} FindRoot[-1 + ProductLog[E^(1 - ...


19

Here's an approach: r1 = Exp[-x^3 - y] - 1 == z; r2 = y == z; We create ImplicitRegions: reg1 = ImplicitRegion[r1, {{x, -4, 4}, {y, -4, 4}, {z, -4, 4}}]; reg2 = ImplicitRegion[r2, {{x, -4, 4}, {y, -4, 4}, {z, -4, 4}}]; The intersection of these regions is the line you seek: reg = RegionIntersection[reg1, reg2]; And here is the length: ...


3

inCircle[p_] := Circle[{x, y}, Abs@r] /. Solve[((# - #2).{y, -x} - Det@{##})/Norm[# - #2] & @@@ Subsets[p, {2}] == r {1, -1, 1}]; Manipulate[ Graphics[{Line@p[[{1, 2, 3, 1}]], Red, inCircle@p}, PlotRange -> 6, Frame -> 1], {{p, {{-2, -1}, {3, -2}, {0, 3}}}, Locator}] Another inCircle: inCircle[pt : {v1_, v2_, v3_}] := ...


7

As KennyColnago has observed your equations seem to be off but there is another way of determining the incircle. I'd already typed it up with sources that may be helpful so let's post it, even if it's the same thing. {a, b, c} = {Norm[pC - pB], Norm[pA - pC], Norm[pA - pB]}; area = With[{s = (a + b + c)/2}, Sqrt[s (s - a) (s - b) (s - c)]]; r = 2 area/(a + ...


11

version 10 pA = {0, 0}; pB = {1.1, 1}; pC = {1.5, 0}; lr = MeshRegion[{pA, pB, pC}, Triangle[Range@3]]; r1 = RegionDistance[InfiniteLine[{pA, pB}], {x, y}]; r2 = RegionDistance[InfiniteLine[{pB, pC}], {x, y}]; r3 = RegionDistance[InfiniteLine[{pC, pA}], {x, y}]; centerC = {x, y} /. NSolve[{r1 == r2, r2 == r3}, {x, y}, Reals]; centerC = Select[centerC, ...


8

The incircle of a triangle may be calculated as follows. InCircle[{x1_, y1_}, {x2_, y2_}, {x3_, y3_}] := With[{ a = Norm[{x2,y2} - {x3,y3}], b = Norm[{x3,y3} - {x1,y1}], c = Norm[{x1,y1} - {x2,y2}]}, Circle[(a {x1, y1} + b {x2, y2} + c {x3, y3})/(a + b + c), 1/2 Sqrt[-(((a - b - c) (a + b - c) (a - b + c))/(a + b + ...


0

One compact way to get $n$ points on a circle would be CirclePoints[center_,radius_,n_] := (center+radius #&) /@ Transpose @ Through[{Re,Im}[Exp[2\[Pi] I Range[n]/n]]]


2

Here is a quick and dirty (read approximate) way to achieve this using Version 10 capabilities: circ[ctr_, r_, n_] := MeshCoordinates @ DiscretizeRegion[Circle[ctr, r], MaxCellMeasure -> {"Length" -> 2 Pi r /(n - 1.5)}] Here ctr is the center, r, the radius and n number of points. Visualize (for $n = 5$): ...



Top 50 recent answers are included