Book Discussion Page: WPF 3d

[WPF 3d]

This is a discussion page for my book WPF 3D, Three-Dimensional Graphics with WPF and C#. Please post questions, thoughts, and suggestions here in the “Leave a Reply” box at the bottom of the page. I will moderate posts and reply as appropriate.


[ OverviewTable of ContentsQuestions and DiscussionErrataSample PicturesSource Code (17.2 MB) ]

[ Buy at: Amazon ]


Follow me on Twitter   RSS feed   Donate




About RodStephens

Rod Stephens is a software consultant and author who has written more than 30 books and 250 magazine articles covering C#, Visual Basic, Visual Basic for Applications, Delphi, and Java.
This entry was posted in 3D, 3D graphics, algorithms, books, drawing, graphics, mathematics, Uncategorized, wpf, XAML and tagged , , , , , , , , , , , , , , . Bookmark the permalink.

18 Responses to Book Discussion Page: WPF 3d

  1. Pingback: WPF 3d: Table of Contents - C# HelperC# Helper

  2. Pingback: Book Sample Pictures: WPF 3d - C# HelperC# Helper

  3. Pingback: Book Errata Page: WPF 3d - C# HelperC# Helper

  4. John M says:

    Rod,

    I just purchased your book on Amazon, should get here shortly. It’s great to have another book on 3D programming with WPF, I have Charles Petzold’s book “3D Programming for Windows” as well. Although I have a graduate in Comp Science, I never got into 3D stuff, basically staying with OS design and low level programming. However, a project my employer started me on using the MPU-9250 has changed much of this – basically I have to project a 3D object’s gyro movements via a USB link to a computer. As well, I have started into 3D MAX to further my development in this field, proving an old tiger might be able to change stripes!

    • RodStephens says:

      Hi John,

      I hope you enjoy the book! Let me know if you have questions as you work through it. Or if you create any cool pictures, please post them.= so everyone else can see! And, of course, post a review on Amazon if you have a chance.

  5. Kyle says:

    Hi Rod,
    I was wondering if your WPF 3D book is available in an electronic version such as PDF or Kindle. If not, is this something that you are considering.
    This is my first time on your site and all of your work looks intriguing.
    Thank you.

  6. Ibrahim Konuk says:

    Rod:

    I got the book in the weekend. Literally, I could not drop it from my hand. It is a superb book. Your helper functions and their algorithms are superb. I wish I could think of them earlier. I am developing a scientific (engineering) application which requires some 3D visualizations and I was in the process of testing Helix 3d wpf toolkit which works. But your approach is going to get rid of a lot of overhead and will give me a lot more flexibility to design my program.

    I am now diving into the material in the book. I will post any comments or suggestions as I go along. My initial intuition tells me the perhaps I can suggest alternative triangulation algorithms using Delaunay triangulation or Voronoi diagrams. I will let you know when I get there.

    Thank you again for writing a beautiful book.

    ikonuk

    • RodStephens says:

      Hi Ikonuk,

      Thanks for the kind words. Post a review when you have a chance!

      I thought about making Delaunay triangulations but decided that it was too much work. There are also some related topics such as making three-dimensional splines to define surfaces. I decided not to include those, mostly to save space and to focus on the graphics and not spend as much time on those algorithms.

      If you build something that you think others might find useful, feel free to post a link in the comments.

  7. John S says:

    Thanks for the book. I just got it. I’m using VS2012 I bought a while back. I’m also on Windows 8.1 Professional. I got busy and entered the code in a WFP project and it compiles fine, I just cant see a Cube. Chapter 2. Since it compiles without any issues I would expect a Cube to display. Anyway I downloaded the source and I will see if there are any discrepancies between what I have and what you have. Have not tried the XAML example yet; Chapter 1. I will try that to. Looking forward to seeing it all work and adding graphics to my projects. I will let you know if I run into any ongoing issues, or what I did to correct them. The only thing I can think of currently the issue may be a setting in VS2012 I’m missing. If you have any knowledge on this please share.

    • RodStephens says:

      I don’t know why it wouldn’t work in VS 2012. I have written similar programs in VS 2008 and they work just fine. There may be some property set on the controls or perhaps the control hierarchy is slightly different. Please post what you find so we can all see what the difference is.

  8. Daniel says:

    Hello, Dear Rod, I’m interested in your book ‘WPF 3d: Three-Dimensional Graphics with WPF and C#’, But i have a question:
    I want to learn 3D from the basics, i want to learn all the math of 3D, Projections and all the process of making a 3D scene absolutely from scratch (Converting 3D Coordinates to screen coordinates, etc, etc), I don’t want to use any of WPF’s built in 3D capabilities, I don’t want to use any 3D library, What i want is to learn how to create my own 3D world totally from zero. (In C# WPF of course).
    Are these issues discussed in your book?

    • RodStephens says:

      Unfortunately that book doesn’t cover the underlying mathematics. It does cover some important stuff like the coordinate systems and how to produce different kinds of projections (like orthographic and cavalier).

      My book “Visual Basic Graphics Programming” covers that, but it’s not the main focus of the book, so there are only 5 chapters about 3D graphics, and one of those is about ray tracing.

      If you want to build your own, you might want to consider ray tracing. It produces a result that is better in many ways and in some ways it is more elegant. It is also slower, but if you do this yourself, you’re not going to get stunningly fast performance in either case. (I’ve written a book about ray tracing as a follow-on to “WPF 3d” but haven’t had the time to publish it yet. I really need to do that.)

      Also note that WPF probably won’t give you a lot of help if you want to do this with your own code, so you could use Windows Forms instead. The big advantage of WPF is the 3D viewport, which you won’t be using.

  9. Daniel says:

    Thank you!! Very appreciated!! So helpful!!

  10. Hornebom says:

    Hello, just started with the book and I have a question.
    Chapter 1, first example (cube):
    why did you define 24 points, 8 should have been sufficient?

    • RodStephens says:

      In WPF (and at least some other 3d modeling tools) if two triangles share a point then the system smooths them so the edge between them is not visible. For example, that’s how you can make a sphere look smooth rather than built out of a bunch of triangles.

      The cube example uses separate points so you can see the edges of its sides. The two triangles that make up a side can share, so we need 4 points per side for a total of 24.

      You might want to try making the cube with just 8 vertices to see the result. It’s pretty interesting and very confusing if you don’t know what’s happening.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.