Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialPaul Elliott
2,882 PointsWhat is the difference between a Scene Graph and a tree?
I took computer science and the picture Craig showed of a scene graph looked a heck of a lot like a tree. What is the difference?
2 Answers
Craig Dennis
Treehouse TeacherNice eyes! So the Scene Graph is in fact using a tree data structure.
Here's some more information about the graph, (check the first sentence in overview)
Pranjal Agnihotri
4,187 PointsSo every graph have cycles?
Lars Reimann
11,816 PointsThey don't have to, but they can. It's just a broader term than tree. Think of it this way: Every square is a rectangle, but not every rectangle is square.
Pranjal Agnihotri
4,187 PointsPranjal Agnihotri
4,187 PointsIts sounds confusing it should be named Scene Tree then because it is using Tree Data Structure because Graph is a Data Structure.
Lars Reimann
11,816 PointsLars Reimann
11,816 PointsThat's true, but trees are just a special type of graphs without cycles.