太极圆圈的Mathematica生成

  太极图的Mathematica代码

  来自于:http://tieba.baidu.com/p/2578898520

  Plot版:
  Plot[{Sqrt[1-x^2],-Sqrt[1-x^2],Sqrt[x-x^2],-Sqrt[-x-x^2],Sqrt[0.005-(x-0.5)^2],-Sqrt[0.005-(x-0.5)^2],Sqrt[0.005-(x+0.5)^2],-Sqrt[0.005-(x+0.5)^2]},{x,-1,1},Axes->False,PlotStyle->Black,Filling->{2->{{4},Black},2->{Axis,Black},3->{Axis,Black},4->{Axis,White},5->{{6},White},7->{{8},Black}
},AspectRatio->Automatic]

  Graphics版:
  Graphics[{Disk[{0,0},1,{Pi/2,(3 Pi)/2}],Disk[{0,1/2},1/2],{White,Disk[{0,-(1/2)},1/2]},{White,Disk[{0,1/2},0.1]},{Disk[{0,-(1/2)},0.1]},Circle[]}]

  能不能让这个太极图旋转起来?

可以的。

下面的代码就能够实现:

   f[x_] := Graphics[Rotate[{Disk[{0, 0}, 1, {Pi/2, (3 Pi)/2}], Disk[{0, 1/2}, 1/2], {White, Disk[{0, -(1/2)}, 1/2]}, {White, Disk[{0, 1/2}, 0.1]}, {Disk[{0, -(1/2)}, 0.1]}, Circle[]}, x Degree], Axes -> False, PlotRange -> 1]
   Animate[f[a], {a, 0, 359}]
  然后,我想要导出到电脑上,用如下代码可以实现!
  f[x_] := Graphics[Rotate[{Disk[{0, 0}, 1, {Pi/2, (3 Pi)/2}],  Disk[{0, 1/2}, 1/2], {White, Disk[{0, -(1/2)}, 1/2]}, {White, Disk[{0, 1/2}, 0.1]}, {Disk[{0, -(1/2)}, 0.1]}, Circle[]}, x Degree], Axes -> False, PlotRange -> 1]
  Export["gi.gif", Table[f[x], {x, 0, 360, 20}]]
 

Mathematica 是数学领域的一个巨人,发布的 Mathematica 软件在各个前沿行业的科学计算,仿真,建模等应用中发挥着关键作用。 我下载了45个典型的 Mathematica 演示范例,供打包下载学习。 AreTheseLinesStraight-source.nb BoilingPointOfWaterOnSeveralPlanets-source.nb CassiniSpaceflight-source.nb CellularAutomataOnTrivalentNetworks-source.nb CIEChromaticityDiagram-source.nb CogwheelDrive-source.nb ComplexAdditionOfHarmonicMotionsAndThePhenomenonOfBeats-source. CosineOffsetCurves-source.nb CurlicueFractal-source.nb DayAndNightWorldClock-source.nb DigitalTiltShiftPhotography-source.nb Emoticon-source.nb IcosahedronBall-source.nb InsulinMolecule-source.nb JackLewSignatureFunction-source.nb KeyboardAndComposer-source.nb KomanVariations-source.nb LengthScalesInTheSolarSystem-source.nb LeonardoDaVincisOrnithopter-source.nb LookingAtACube-source.nb MicrowaveOven-source.nb MosaicEffectForPhotographicImages-source (1).nb MosaicEffectForPhotographicImages-source.nb Mountainscape-source.nb PicturePuzzle-source.nb PicturePuzzle.cdf PolynomialAndDerivative-source.nb RadialEngine-source.nb ReliefShadedElevationMap-source.nb SaturnsSeasonalSundial-source.nb SegmentingAMedicalImage-source.nb SmileyChanger-source.nb SpringReturnButton-source.nb SunflowerSeedArrangements-source.nb SunflowerSeedArrangements-source.pdf SurfaceWithBranchCuts-source.nb TermWeightingWithTFIDF-source.nb TheUlamPrimeSpiral-source.nb ThickeningAPolygonMeshForRapidPrototyping3DPrinting-source.nb TravelingSalesmanArt-source.nb TreeBender-source.nb Tries-source.nb TwentyDodecahedronTowers-source.nb VoronoiImage-source.nb WhirlingPolygons-source.nb
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值