Пример #1
0
        private void CreateVisual()
        {
            var pos = m_StartPos;
             for (var i = 0; i < NUM_POINTS; i++)
             {
            var glyph = new Glyph
            {
               Transform = new TranslateTransform3D(pos.X, pos.Y, pos.Z)
            };

            Children.Add(glyph);
            pos = RK4Lorenz(pos, STEP_SIZE);
             }
        }
Пример #2
0
        private void OnMouseDown(object sender, MouseButtonEventArgs e)
        {
            var transformGroup = new Transform3DGroup();
             transformGroup.Children.Add(m_Lorenz.Transform);
             transformGroup.Children.Add(new RotateTransform3D { Rotation = new AxisAngleRotation3D { Axis = new Vector3D(0, 1, 0), Angle = 180 } });
             transformGroup.Children.Add(new TranslateTransform3D(new Vector3D(0, 0, 0)));

             var glyph = new Glyph
             {
            Transform = transformGroup
             };
             XViewport.Children.Add(glyph);
        }