Wolfram 언어

단위 및 날짜

혼합 수량

혼합 수량은 금전, 시간, 거리, 무게, 각도 등 다수의 컨텍스트에 나타납니다.

In[1]:=
Click for copyable input
Quantity[MixedMagnitude[{2, 35, 21.2}], MixedUnit[{"Hours", "Minutes", "Seconds"}]]
Out[1]=
In[2]:=
Click for copyable input
UnitConvert[Quantity[75.562, "AngularDegrees"], MixedUnit[{"AngularDegrees", "ArcMinutes", "ArcSeconds"}]]
Out[2]=
In[3]:=
Click for copyable input
Quantity[MixedMagnitude[{5, 11}], MixedUnit[{"Feet", "Inches"}]]
Out[3]=
In[4]:=
Click for copyable input
Quantity[MixedMagnitude[{5, 11}], MixedUnit[{"Feet", "Inches"}]]; % + Quantity[2.5, "Feet"]
Out[4]=

함수 SiderealTime 혼합 수량을 반환합니다. 사용자의 현재 위치에서 항성시를 구합니다.

In[5]:=
Click for copyable input
stime = SiderealTime[]
Out[5]=

태양의 현재 위치를 적도 좌표계에서 구합니다.

In[6]:=
Click for copyable input
sunpos = SunPosition[CelestialSystem -> "Equatorial"]
Out[6]=

달의 위치를 같은 좌표계에서 계산합니다.

In[7]:=
Click for copyable input
moonpos = MoonPosition[CelestialSystem -> "Equatorial"]
Out[7]=

행성의 적경 좌표를 구합니다.

In[8]:=
Click for copyable input
planetpos = QuantityMagnitude[ DeleteMissing[ EntityValue[EntityClass["Planet", All], EntityProperty["Planet", "RightAscension"]]], "HoursOfRightAscension"]
Out[8]=

다양한 위치의 측도 값을 결합하여 각 천체의 적경의 목록을 만듭니다.

In[9]:=
Click for copyable input
ascensions = Join[ {0, moonpos[[1, 1]] - sunpos[[1, 1]]}, planetpos];
전체 Wolfram 언어 입력 표시하기
In[10]:=
Click for copyable input
gp = Sequence[GeoRange -> "World", GeoProjection -> {"AzimuthalEquidistant", "Centering" -> {-90, 0}}]; globe = GeoGraphics[{Thick, Black, Arrow[{{0, 0}, $GeoLocation}]}, gp, GeoBackground -> GeoStyling["ReliefMap"]][[1, 1]]; cross = {Thickness[.005], Opacity[.5], Line[9.5 {-#, #}]} & /@ {{0, 1}, {1, 0}}; shade = GeoGraphics[{Opacity[.5], GeoDisk[{-sunpos[[2, 1]], 180}, 10018758]}, gp, GeoBackground -> None][[1, 1]];

남극에서 본 지구, 태양, 달의 위치의 그래픽 뷰를 생성합니다.

전체 Wolfram 언어 입력 표시하기
In[11]:=
Click for copyable input
Rasterize[ Graphics[{globe, cross, shade, MapThread[ Text[Style[#3, #2, 24, FontWeight -> Bold], {0, 3.5}.RotationMatrix[(#1) \[Pi]/12]] &, {ascensions, {Yellow, White, Orange, Lighter[Blue], Red, Lighter[Purple], Orange, Cyan, Lighter[Blue]}, {"☼", "\[Moon]", "\[Mercury]", "\[Venus]", "\[Mars]", "\[Jupiter]", "\[Saturn]", "♅", "\[Neptune]"}}]}, Background -> GrayLevel[0.2], PlotRange -> 4, PlotLabel -> #, LabelStyle -> {Bold, White}, Axes -> None] &@stime, RasterSize -> 600, ImageSize -> 450]
Out[11]=

관련 예제

de en es fr ja pt-br zh