podstawie Sjoerd, świetne rozwiązanie i przedłużenie na From Cartesian Plot to Polar Histogram using Mathematica, należy rozważyć następujące:arctan Binning, z działki na histogramie sztuczki
list = {{21, 16}, {16, 14}, {11, 11}, {11, 12},
{13, 15}, {18, 17}, {19, 11}, {17, 16}, {16, 19}}
ScreenCenter = {20, 15}
ListPolarPlot[{ArcTan[##], EuclideanDistance[##]} & @@@ (# - ScreenCenter & /@ list),
PolarAxes -> True, PolarGridLines -> Automatic, Joined -> False,
PolarTicks -> {"Degrees", Automatic},
BaseStyle -> {FontFamily -> "Arial", FontWeight -> Bold,
FontSize -> 12}, PlotStyle -> {Red, PointSize -> 0.02}]
Module[{Countz, maxScale, angleDivisions, dAng},
Countz = Reverse[BinCounts[[email protected][ArcTan[#[[1]] - ScreenCenter[[1]], #[[2]] -
ScreenCenter[[2]]] &, list, {1}], {-\[Pi], \[Pi], \[Pi]/6}]];
maxScale = 4;
angleDivisions = 12;
dAng = (2 \[Pi])/angleDivisions;
SectorChart[{ConstantArray[1, Length[Countz]], Countz}\[Transpose],
SectorOrigin -> {-\[Pi]/angleDivisions, "Counterclockwise"},
PolarAxes -> True,
PolarGridLines -> Automatic,
PolarTicks -> {Table[{i \[Degree] + \[Pi]/angleDivisions,i \[Degree]},
{i, 0, 345, 30}], Automatic},
ChartStyle -> {Directive[EdgeForm[{Black, Thickness[0.005]}], Red]},
BaseStyle -> {FontFamily -> "Arial", FontWeight -> Bold,
FontSize -> 12}, ImageSize -> 400]]
Jak widać, histogram pokazuje obrotową symetrię tego, co powinno. Próbowałem wszystkiego, aby uzyskać proste, ale nie udało. Bez Reverse jest najgorsze. Próbowałem RotateRight bez sukcesu. Czuję, że problem jest w moim BinCount. Wyjście ArcTan z -Pi do Pi, podczas gdy Sjoerd zasugerował, że muszę przejść od 0 do 2Pi. Ale nie rozumiem, jak to zrobić.
EDYCJA: Problem rozwiązany. Dzięki Sjoerdowi, Belizariuszowi, rozwiązaniom Heike'a, jestem w stanie pokazać histogram lokalizacji fiksacji oka, biorąc pod uwagę środek ciężkości obrazu.
@beliarius: Przy użyciu 'ArcTan' w postaci' arctan [x, y] 'zasięg to' (-Pi, Pi) ' – Heike
@belisarius, Przepraszam, jestem po prostu z tego powodu :-(Dziękuję za pomoc! – 500
@ 500 Zwróć uwagę na rozwiązanie Heike jako wydaje się pasować do pozycji lepiej –