## What is the difference between Photoshop RGB Curve and Lightroom RGB Tone Curve?

I am very confused with the following situation, say that we have an image with two colors: (RGB 0.60.60) and (RGB 255.0.0).

I noticed that the tone curve in Adobe Lightroom works differently from Photoshop. What I understood is that the Photoshop RGB curve remaps the tone values ​​of each color channel to the new one determined by the curve. For example, if we make the following modification to the curve:

The left color that was (RGB 0.60.60) is now (RGB 0.0.0) because the value 60 in the green and blue channels is now remapped to 0.
The correct color (pure red, (RGB 255,0,0)) has not changed at all, as we have not moved the point of the curve which corresponds to 255.

What makes me confused is that in Lightroom when you make the same change in the tone curve, something different happens.

Now the color red (RGB 255,0,0) has turned black (0,0,0) but I have not moved the point which corresponds to 255. I also know that Lightroom uses space ProPhotoRGB colorimetric and not sRGB.
But in general, I don't understand exactly what happens when I change the curves and also why Photoshop and Lightroom make different changes. I found other similar questions in Photo.Stackexchange but they didn't help me.
Can anyone explain to me exactly what is going on in depth?

## Calculate the discriminant and the conductor of an elliptical curve using magma

To calculate the minimum discrimination and the conductor of an elliptical curve using magma for example this elliptic curve, we use this command

E: = EllipticCurve ((0,8,0,48,0));

E;

Elliptical curve defined by y ^ 2 = x ^ 3 + 8 * x ^ 2 + 48 * x on the rational field

F: = MinimalModel (E);

F;

Elliptical curve defined by y ^ 2 = x ^ 3 – x ^ 2 + 2 * x – 2 on the rational field

D: = Discriminant (F);

N: = conductor (E);

My quastion is how to calculate the discriminant and the conductor when the curve has a variable coefficient for example this elliptical curve

$$y ^ 2 = x (x-a) (x-D ^ {p} zeta ^ {k})$$
Or $$a, D$$ are integers and $$zeta ^ {k}$$ is the k-th power of unity

## plotting – How can I use the procedure, circle3D, to make an animation of the osculator circle of a parametric curve?

I am trying to use `circle3D` below, to create an animation of the osculator circle of a parametric curve.

``````(* circle3D PROCEDURE *)

(* Let's create circle3D that is something we would expect from
Circle but with an extra argument for its normal vector *)

circle3D(centre_: {0, 0, 0}, radius_: 1, normal_: {0, 0, 1}, angle_: {0, 2 Pi}) :=
Composition(
Line,
Map(RotationTransform({{0, 0, 1}, normal}, centre), #) &,
Map(Append(#, Last@centre) &, #) &,
Append(DeleteDuplicates(Most@#), Last@#) &,
Level(#, {-2}) &,
MeshPrimitives(#, 1) &,
DiscretizeRegion,
If)(First @ Differences @ angle >= 2 Pi,
``````

I am a new user of this site and also of Mathematica. I found this procedure on the site. It works perfectly with `Graphics3D`, but when I try to use it to create an animation, I get an error with the following content:

TransformationFunction contact details ({{, 4413884991460323, -0.5698965816793001,, 693104666707606, -54.82771835995227}, {-0,5698965816793001,, 4185903560645521,, 7071067811865474, -55.935347033890770107707601077077831} , -0.14002114478941538`, should be a triple of numbers, or a Scaled form.

Here is the code for my Mathematica notebook:

``````(* Solution: *)

ClearAll("Global`*");

(* ZAŁOŻENIE GLOBALNE t > 0 *)
\$Assumptions = t > 0;

(* KRZYWA *)
r(t_) := {t + 1/t, t - 1/t, 2 Log(t)};

(* JEDNOSTKOWY WEKTOR STYCZNY *)
tv = D(r(t), t);
tvnorm = Simplify(Sqrt(tv.tv));
utv = tv/tvnorm;

(* POCHODNA WEKTORA STYCZNEGO *)
tvD = D(tv, t);

(* JEDNOSTKOWY WEKTOR BINORMALNY  *)
bv = tv(Cross)tvD;
bvnorm = Simplify(Sqrt(bv.bv));
ubv = bv/bvnorm;

(* JEDNOSTKOWY WEKTOR NORMALNY  *)
unv = ubv(Cross)utv;

(* ORTOGONALNOŚĆ WEKTORÓW utv, ubv, unv *)
Simplify((ubv(Cross)utv)(Cross)unv);

(* KRZYWIZNA KRZYWEJ *)
k = bvnorm/tvnorm^3;

(* PROMIEŃ OKRĘGU OSKULACYJNEGO *)
or = 1/k;

(* WEKTOR WODZĄCY ŚRODKA OKRĘGU OSKULACYJNEGO *)
occv = r(t) + or*unv;

(* W PUNKCIE M: *)

(* PUNKT M - tutaj t = 1 *)
pM = {2, 0, 0};

(* JEDNOSTKOWY WEKTOR STYCZNY w M *)
utvM = utv /. t -> 1;

(* JEDNOSTKOWY WEKTOR BINORMALNY w M *)
ubvM = ubv /. t -> 1;

(* JEDNOSTKOWY WEKTOR NORMALNY w M *)
unvM = unv /. t -> 1;

(* KRZYWIZNA KRZYWEJ w M *)
kM = k /. t -> 1;

(* PROMIEŃ OKRĘGU OSKULACYJNEGO w M *)
orM = 1/kM;

(* WEKTOR WODZĄCY ŚRODKA OKRĘGU OSKULACYJNEGO w M *)
occvM = r(t) + or*unv /. t -> 1;

In(23):= (* circle3D PROCEDURE *)

(* Let's create circle3D that is something we would expect from
Circle but with an extra argument for its normal vector *)

circle3D(centre_: {0, 0, 0}, radius_: 1, normal_: {0, 0, 1},
angle_: {0, 2 Pi}) :=
Composition(
Line,
Map(RotationTransform({{0, 0, 1}, normal}, centre), #) &,
Map(Append(#, Last@centre) &, #) &,
Append(DeleteDuplicates(Most@#), Last@#) &,
Level(#, {-2}) &,
MeshPrimitives(#, 1) &,
DiscretizeRegion,
If
)(First@Differences@angle >= 2 Pi,
)

(* Visualization: *)

In(24):= (* SKALOWANIE WEKTORÓW JEDNOSTKOWYCH *)
scalvs = 3;

(* KRZYWA *)
curV = ParametricPlot3D(r(t), {t, 0.1, 4}, PlotStyle -> Red);

(* PUNKT M NA KRZYWEJ *)
pMV = Graphics3D({Blue, PointSize(Large), Point(pM)});

(* ŚRODEK OKRĘGU OSKULACYJNEGO W M *)
occvMV = Graphics3D({Black, PointSize(Large), Point(occvM)});

(* OKRĄG OSKULACYJNY W M *)
ocMV = Graphics3D(circle3D(occvM, orM, ubvM ));

(* JEDNOSTKOWY WEKTOR STYCZNY W M *)
utvMV = Graphics3D({Green, Arrow({pM, pM + scalvs*utvM})});

(* JEDNOSTKOWY WEKTOR NORMALNY W M *)
unvMV = Graphics3D({Magenta, Arrow({pM, pM + scalvs*unvM})});

(* JEDNOSTKOWY WEKTOR BINORMALNY W M *)
ubvMV = Graphics3D({Cyan, Arrow({pM, pM + scalvs*ubvM})});

(* WYKRES *)
Show({curV, pMV, occvMV, ocMV, utvMV, ubvMV, unvMV},
BaseStyle -> {FontSize -> 12, FontFamily -> "Verdena"}, Axes -> True,
AxesLabel -> {x, y, z}, Ticks -> Automatic, AxesStyle -> {Red, Green, Blue},
PlotRange -> {{1, 12}, {-5, 4}, {-5, 3}},
PlotLabel ->
Style(Framed("Krzywa i okrąg oskulacyjny", FrameStyle -> Red), Bold, 14,
Black, Background -> Lighter(LightYellow)),
BaseStyle -> {FontSize -> 12, FontFamily -> "Verdena"})

(* Animation: *)

(* SKALOWANIE WEKTORÓW JEDNOSTKOWYCH *)
scalvs = 3;

(* KRZYWA *)
curV = ParametricPlot3D(r(t), {t, 0.1, 4}, PlotStyle -> Red);

(* PEWIEN PUNKT P NA KRZYWEJ *)
pPV(t_) = Graphics3D({Blue, PointSize(Large), Point(r(t))});

(* ŚRODEK OKRĘGU OSKULACYJNEGO W P *)
occvPV(t_) = Graphics3D({Black, PointSize(Large), Point(occv)});

(* OKRĄG OSKULACYJNY W P *)
ocPV(t_) = Graphics3D(circle3D(occv, or, ubv ));

(* JEDNOSTKOWY WEKTOR STYCZNY W P *)
utvPV(t_) = Graphics3D({Green, Arrow({r(t), r(t) + scalvs*utv})});

(* JEDNOSTKOWY WEKTOR NORMALNY W P *)
unvPV(t_) = Graphics3D({Magenta, Arrow({r(t), r(t) + scalvs*unv})});

(* JEDNOSTKOWY WEKTOR BINORMALNY W P *)
ubvPV(t_) = Graphics3D({Cyan, Arrow({r(t), r(t) + scalvs*ubv})});

(* ANIMATION *)

Animate(
Show({curV, pPV(t), occvPV(t), ocPV(t), utvPV(t), ubvPV(t), nvPV(t)},
BaseStyle -> {FontSize -> 12,
FontFamily -> "Verdena"},
Axes -> True,
AxesLabel -> {x, y, z},
Ticks -> Automatic,
AxesStyle -> {Red, Green, Blue},
PlotRange -> {{1, 12}, {-5, 4}, {-5, 3}},
PlotLabel ->
Style(Framed("Krzywa i okrąg oskulacyjny",
FrameStyle -> Red), Bold, 14, Black,
Background -> Lighter(LightYellow)),
BaseStyle -> {FontSize -> 12, FontFamily -> "Verdena"}), {t, 0.1, 4},
AnimationRunning -> False)
``````

## r – The standard deviation is equal to 0 in the accumulation curve of the "vegan" package

I plan to build an accumulation curve using the package `vegan`. When using the function `specaccum`, a message appears that the standard deviation is 0 and the graph appears to be out of adjustment. Here are the command lines of my R script:

``````dados <- read.table("Dataset.txt", h = T, sep = "t")

> Warning message:
In cor(x > 0): o desvio padrão é zero

y.mínimo <- min(richness)
y.máximo <- max(richness)

y.baixo <- y.mínimo*0.80
y.alto <- y.máximo+(y.mínimo*0.10)

limites.y <- c(y.baixo, y.alto)
``````

Then when I try to draw the graph, it looks like this:

``````plot(richness ~ sites, type = "l",
ylim = limites.y, xlim = c(1, 9), las = 1, xlab = "Esforço amostral",
ylab = "Riqueza de espécies")

arrows(sites, richness-sd, sites, richness+sd,
angle = 90, code = 3, length = 0.05)

Warning messages:
1: In arrows(sites, richness - sd, sites, richness + sd, angle = 90,  :
zero-length arrow is of indeterminate angle and so skipped
2: In arrows(sites, richness - sd, sites, richness + sd, angle = 90,  :
zero-length arrow is of indeterminate angle and so skipped

points(richness ~ sites, pch = 21, bg = "white")
``````

And the graph looks like this:

Does anyone know how to tell me how to correct my data (or codes), so that the graph looks more or less what it is below?

By the way, these are my data:

``````structure(list(Anos = c(2009L, 2015L, 2011L, 2007L, 2005L, 2013L
), Coluna1 = c(13L, 11L, 9L, 8L, 6L, 6L), Coluna2 = c(1L, 0L,
0L, 1L, 0L, 0L), Coluna3 = c(1L, 8L, 10L, 2L, 4L, 4L), Coluna4 = c(7L,
5L, 2L, 5L, 7L, 1L)), class = "data.frame", row.names = c(NA,
-6L))
``````

## plotting – curve fitting to a dataset

I am trying to adapt a polynomial to the data listed as {{0,6.67}, {6,17.33}, {10,42.67}, {13,37.33}, {17,30.1}, {20, 29.31}, {28,28.74}}. When I use LinearModelFit [data, {x, x ^ 2, x ^ 3, x ^ 4, x ^ 5, x ^ 6}, x] I get FittedModel [6.67-42.6435x + 16.1427x ^ 2- <<19>> x ^ 3 + <<20>> x ^ 4-0.00367168x ^ 5 + 0.0000409458x ^ 6. I don't understand why I don't get coefficients for the terms x ^ 3 and x ^ 4 which make sense and I would like to 39; help to solve this problem.

## list manipulation – Replacement of sublists by criteria or interpolation for a smooth curve

Suppose we have the following list (very small, can be copied directly into a notebook)

``````{
{1.25, 0},
{1.3, 0.125},
{1.4, 0.175},
{1.5, 0.225},
{1.6, 0.275}, {1.7, 0.275},
{1.8, 0.325},
{1.9, 0.375}, {2., 0.375}, {2.1, 0.375},
{2.2, 0.425}, {2.3, 0.425},
{2.4, 0.475}, {2.5, 0.475}, {2.6, 0.475}, {2.7, 0.475},
{2.8, 0.525}, {2.9, 0.525}, {3., 0.525},
{3.1, 0.575}, {3.2, 0.575}, {3.3, 0.575}, {3.4, 0.575}, {3.5, 0.575},
{3.6, 0.625}, {3.7, 0.625}, {3.8, 0.625}, {3.9, 0.625}, {4., 0.625},
{4.1, 0.675}, {4.2, 0.675}, {4.3, 0.675}, {4.4, 0.675}, {4.5, 0.675}, {4.6, 0.675}, {4.7, 0.675},
...}
``````

The special feature of the list is some adjacent sublists with the same 2nd elements and 1st continuous element, as the line breaks emphasize. By plotting it, we can see that the aforementioned feature causes the dots to be aligned horizontally in a step-by-step manner.

``````ListPlot(data, Frame -> True, PlotRange -> {{0, 10}, {0, 1}}, ImageSize -> 400, PlotStyle -> {Red, Thick})
``````

What I want is a smooth "fit" curve instead of a discrete point plot. To this end, I have tried `Interpolation`, but it turns out that the increase `InterpolationOrder` is of no help. Btw, adding an option to `Method -> "Hermite"` or `Method -> "Spline"` is useless either. I also tried `Fit(data, {1, x, x^2, x^3}, x)`, which turns out to be even worse.

``````interpdata = Interpolation(data, InterpolationOrder -> 10);
Plot(interpdata(x), {x, data((1, 1)), data((-1, 1))}, Frame -> True, PlotRange -> All, ImageSize -> 400, PlotStyle -> {Red, Thick})
``````

So i want to manipulate the original data by replacing the adjacent sublists with the same 2nd element using a procedure like this:

Check the length of the adjacent sublists with the same 2nd element and use the average value of their 1st elements as the 1st element of the new sublist, then replace these sublists with the resulting sublist, that’s -to say, `{mean of 1st elem, the same 2nd elem}`. For example,

`{1.6, 0.275}, {1.7, 0.275}` => `{1.65, 0.275}`,

`{1.9, 0.375}, {2., 0.375}, {2.1, 0.375}` => `{2, 0.375}`

`{2.4, 0.475}, {2.5, 0.475}, {2.6, 0.475}, {2.7, 0.475}` => `{2.55,0.475}`

I guess it can be done with SequenceSplit and the new list should give me a reasonable curve. But i'm having trouble using `SequenceSplit` in that case. Could someone help me? It will be great if some interpolation method can be compared to the plot of the new list. Thank you!

## multivariable calculation – Average curvature of the parametric curve

I am trying to calculate the average curvature of a curve parametrized by $$(x (t), y (t))$$ in a two-dimensional space with ambient metric $$g$$. I know a formula for the average curvature, $$K = nabla_i hat {n} ^ i$$ or $$nabla_i$$ is the covariant derivative with respect to $$g$$ and $$hat {n} ^ i$$ is the unit normal vector. I can write $$hat {n} ^ i$$ in terms of functions $$x (t)$$ and $$y (t)$$and their first derivatives. I'm stuck trying to calculate things like $$partial_x hat {n} ^ x$$. What is $$partial_x x & # 39; (t)$$? Can i naively take that for equal $$x & # 39; & # 39; (t) / x & # 39; (t)$$? If I do, I seem to get the wrong result, but I don't know if I'm making a mistake or if I have a wrong understanding.

To be concrete, I take the hyperbolic metric $$g_ {xx} = g_ {yy} = 1 / y ^ 2$$. I can then write the normal vector as
$$hat {n} = frac {y} { sqrt {x & # 39; ^ 2 + y & # 39; ^ 2}} (y ​​& # 39 ;, -x & # 39;)$$
Thanks for taking the time to answer this. I'm trying to calculate the term extrinsic curvature $$K$$ within the limits of Gibbons-Hawking.

## precalculation algebra – how to get a nice cosine curve following the direction y = x?

My goal is to get a "cosine-like" curve rotated 45 ° clockwise.

When I represent: f (x) = x + cos (x) , I get a curve which has lost the pleasant and regular oscillation of the curve y = cos (x) ordinary.

Adding a coefficient does not work, but rather exacerbates the change in shape.

Is there a possible equation that would produce the curve I am aiming for?

## dg.differential geometry – Metric with positive curve with uniformly positive scalar curvature

Can we find a complete non-compact Riemannian collector $$(M ^ n, g)$$ with a bounded geometry satisfying the following conditions?

1. the curvature operator $$Rm> 0$$;

2. scalar curvature $$R ge 1$$.

Note that such a collector must be diffeomorphic to $$mathbb R ^ n$$.

## Labeling – How can I make the edge labels of the graphic either parallel to an edge line or follow an edge curve?

The edge labels are always rendered horizontally. I would like the label of any straight edge to be rotated so that the bottom of the label bounding box coincides with the edge.

There was an older publication (Comfortable Edge Labeling of Undirected Graph) which did this using EdgeRenderingFunction, but which was replaced by EdgeShapeFunction in v12. EdgeShapeFunction does not have access to the label like EdgeRenderingFunction.

Labels following a curved edge would be a bonus, but it would suffice to parallel a tangent somewhere on the edge.