Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Argh!

Argh!

Scheduled Pinned Locked Moved The Lounge
37 Posts 11 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Pete OHanlon

    You can, but you need to download the XNA Math Helper[^] first. Then you can use the VertexPositionColor and Vector3 classes to help you. For instance:

    Vector3 pt = new Vector3(1,1,0);
    VertexPositionColor[] vertices = new VertexPositionColor[1];
    vertices[0] = new VectorPositionColor(pt, color); // Where color is the colour of the brush
    VertexBuffer vertexBuffer = new VertexBuffer(device, VertexPositionColor.VertexDeclaration, vertices.Length, BufferUsage.WriteOnly);
    vertexBuffer.SetData(0, vertices, 0, vertices.Length, 0);
    device.SetVertexBuffer(vertexBuffer);

    Forgive your enemies - it messes with their heads

    My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

    W Offline
    W Offline
    wout de zeeuw
    wrote on last edited by
    #9

    We have made those classes ourselves, this is not problematic. The problematic part is that there's no PointList primitive, just LineList, LineStrip, TriangleList, TriangleStrip.

    Wout

    L 1 Reply Last reply
    0
    • W wout de zeeuw

      In CAD many people draw dashed/dotted lines. So a dot would be a 1x1 pixel thingy, and a line would be a 1 pixel wide thingy.

      Wout

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #10

      But in 3D, a point consists of 3 dimensions - x/y and z.

      Forgive your enemies - it messes with their heads

      My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

      D 1 Reply Last reply
      0
      • L Lost User

        Uhm, no. In math, a point has exactly zero dimensions. It's infinitely small and not much to draw therefore. What you probably want to do is to set a small (but not not infinitely small) sprite or billboard at some 3D coordinates.

        "I just exchanged opinions with my boss. I went in with mine and came out with his." - me, 2011 ---
        I am endeavoring, Madam, to construct a mnemonic memory circuit using stone knives and bearskins - Mr. Spock 1935 and me 2011

        D Offline
        D Offline
        Dalek Dave
        wrote on last edited by
        #11

        There is a point in time when it is not there. There is a point in time when it is. Then there is a another point in time when it ceases. If you wish to talk maths then please continue, but be aware that there are a lot more than three dimensions, and that the temporal and hyperspatial ones can do some odd things. Have you ever worked out the volume of a tesseract (aka a Hypercube)? Very difficult, and what about projections of future positions of known points, a clock is useful there!

        ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

        L H S 3 Replies Last reply
        0
        • P Pete OHanlon

          But in 3D, a point consists of 3 dimensions - x/y and z.

          Forgive your enemies - it messes with their heads

          My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

          D Offline
          D Offline
          Dalek Dave
          wrote on last edited by
          #12

          My, what a small minded race the humans are. Only three dimensions? Pfft...Do you not own a clock?

          ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

          P 1 Reply Last reply
          0
          • D Dalek Dave

            There is a point in time when it is not there. There is a point in time when it is. Then there is a another point in time when it ceases. If you wish to talk maths then please continue, but be aware that there are a lot more than three dimensions, and that the temporal and hyperspatial ones can do some odd things. Have you ever worked out the volume of a tesseract (aka a Hypercube)? Very difficult, and what about projections of future positions of known points, a clock is useful there!

            ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #13

            Yes, sure I know a hypercube :)

            "I just exchanged opinions with my boss. I went in with mine and came out with his." - me, 2011 ---
            I am endeavoring, Madam, to construct a mnemonic memory circuit using stone knives and bearskins - Mr. Spock 1935 and me 2011

            1 Reply Last reply
            0
            • W wout de zeeuw

              We have made those classes ourselves, this is not problematic. The problematic part is that there's no PointList primitive, just LineList, LineStrip, TriangleList, TriangleStrip.

              Wout

              L Offline
              L Offline
              loveangel888
              wrote on last edited by
              #14

              Is it possible to make a line with length of one instead. I don't think anyone can tell the difference.

              W 1 Reply Last reply
              0
              • L loveangel888

                Is it possible to make a line with length of one instead. I don't think anyone can tell the difference.

                W Offline
                W Offline
                wout de zeeuw
                wrote on last edited by
                #15

                You could, but very inconvenient, because the length 1 is in screen space, whilst you normally define all vertices in model space, and then position your camera etc etc. So to do the dots you'd have to mess up the whole standard rendering pipeline.

                Wout

                1 Reply Last reply
                0
                • W wout de zeeuw

                  Can't draw a point in Silverlight 5 3D. :wtf: Feels like going back in time.

                  Wout

                  H Offline
                  H Offline
                  hairy_hats
                  wrote on last edited by
                  #16

                  You could convert your product to OpenGL. :-D

                  N W 2 Replies Last reply
                  0
                  • P Pete OHanlon

                    You can, but you need to download the XNA Math Helper[^] first. Then you can use the VertexPositionColor and Vector3 classes to help you. For instance:

                    Vector3 pt = new Vector3(1,1,0);
                    VertexPositionColor[] vertices = new VertexPositionColor[1];
                    vertices[0] = new VectorPositionColor(pt, color); // Where color is the colour of the brush
                    VertexBuffer vertexBuffer = new VertexBuffer(device, VertexPositionColor.VertexDeclaration, vertices.Length, BufferUsage.WriteOnly);
                    vertexBuffer.SetData(0, vertices, 0, vertices.Length, 0);
                    device.SetVertexBuffer(vertexBuffer);

                    Forgive your enemies - it messes with their heads

                    My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

                    N Offline
                    N Offline
                    NormDroid
                    wrote on last edited by
                    #17

                    Pete O'Hanlon wrote:

                    vertices[0] = new VectorPositionColor(pt, color); // Where color is the colour of the brush

                    Just love that comment...

                    Software Kinetics - The home of good software

                    1 Reply Last reply
                    0
                    • H hairy_hats

                      You could convert your product to OpenGL. :-D

                      N Offline
                      N Offline
                      NormDroid
                      wrote on last edited by
                      #18

                      Or even WebGL so it works in a browser :rolleyes:

                      Software Kinetics - The home of good software

                      1 Reply Last reply
                      0
                      • D Dalek Dave

                        There is a point in time when it is not there. There is a point in time when it is. Then there is a another point in time when it ceases. If you wish to talk maths then please continue, but be aware that there are a lot more than three dimensions, and that the temporal and hyperspatial ones can do some odd things. Have you ever worked out the volume of a tesseract (aka a Hypercube)? Very difficult, and what about projections of future positions of known points, a clock is useful there!

                        ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

                        H Offline
                        H Offline
                        hairy_hats
                        wrote on last edited by
                        #19

                        Dalek Dave wrote:

                        there are a lot more than three dimensions

                        Mathematically, yes...in reality, it remains to be proved.

                        D 1 Reply Last reply
                        0
                        • D Dalek Dave

                          My, what a small minded race the humans are. Only three dimensions? Pfft...Do you not own a clock?

                          ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

                          P Offline
                          P Offline
                          Pete OHanlon
                          wrote on last edited by
                          #20

                          Indeed I do, but you may note that I clearly stated "in 3D". By default, Silverlight 3D exists in 4D.

                          Forgive your enemies - it messes with their heads

                          My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

                          K 1 Reply Last reply
                          0
                          • H hairy_hats

                            You could convert your product to OpenGL. :-D

                            W Offline
                            W Offline
                            wout de zeeuw
                            wrote on last edited by
                            #21

                            Our product already does OpenGL. I mentioned on the MSDN forum that OpenGL 1.1 can do points, but this invoked a "I know, OpenGL..., but let's be realistic" reply...

                            Wout

                            1 Reply Last reply
                            0
                            • H hairy_hats

                              Dalek Dave wrote:

                              there are a lot more than three dimensions

                              Mathematically, yes...in reality, it remains to be proved.

                              D Offline
                              D Offline
                              Dalek Dave
                              wrote on last edited by
                              #22

                              Time? Or is that just a theory?

                              ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

                              H L 2 Replies Last reply
                              0
                              • D Dalek Dave

                                Time? Or is that just a theory?

                                ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

                                H Offline
                                H Offline
                                hairy_hats
                                wrote on last edited by
                                #23

                                That's one more. You said "a lot more". :)

                                D 1 Reply Last reply
                                0
                                • H hairy_hats

                                  That's one more. You said "a lot more". :)

                                  D Offline
                                  D Offline
                                  Dalek Dave
                                  wrote on last edited by
                                  #24

                                  String Theory[^] And even Uncertainty is uncertain[^]. It depends on more dimensions than can be explained at the moment.

                                  ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

                                  H 1 Reply Last reply
                                  0
                                  • D Dalek Dave

                                    String Theory[^] And even Uncertainty is uncertain[^]. It depends on more dimensions than can be explained at the moment.

                                    ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

                                    H Offline
                                    H Offline
                                    hairy_hats
                                    wrote on last edited by
                                    #25

                                    I know of String Theory, and how it has failed to produce a single concrete prediction. Give any mathematical model enough degrees of freedom and you can make it look like anything. I'm not convinced it is the answer.

                                    1 Reply Last reply
                                    0
                                    • D Dalek Dave

                                      There is a point in time when it is not there. There is a point in time when it is. Then there is a another point in time when it ceases. If you wish to talk maths then please continue, but be aware that there are a lot more than three dimensions, and that the temporal and hyperspatial ones can do some odd things. Have you ever worked out the volume of a tesseract (aka a Hypercube)? Very difficult, and what about projections of future positions of known points, a clock is useful there!

                                      ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

                                      S Offline
                                      S Offline
                                      soap brain
                                      wrote on last edited by
                                      #26

                                      Dalek Dave wrote:

                                      Have you ever worked out the volume of a tesseract (aka a Hypercube)? Very difficult

                                      You're joking, right? V = s4.

                                      D 1 Reply Last reply
                                      0
                                      • S soap brain

                                        Dalek Dave wrote:

                                        Have you ever worked out the volume of a tesseract (aka a Hypercube)? Very difficult

                                        You're joking, right? V = s4.

                                        D Offline
                                        D Offline
                                        Dalek Dave
                                        wrote on last edited by
                                        #27

                                        V = s4? Are you sure? Rotating Hypercube[^], not easy is it? Some information[^]. Want to try again?

                                        ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

                                        S 1 Reply Last reply
                                        0
                                        • D Dalek Dave

                                          V = s4? Are you sure? Rotating Hypercube[^], not easy is it? Some information[^]. Want to try again?

                                          ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

                                          S Offline
                                          S Offline
                                          soap brain
                                          wrote on last edited by
                                          #28

                                          Dalek Dave wrote:

                                          Are you sure?

                                          Yes.

                                          Dalek Dave wrote:

                                          Want to try again?

                                          OK. A tesseract is a cube extruded along the w-axis a distance of s. Hence, V = s4.

                                          D 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups