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 trial

Java Build a JavaFX Application Graphical User Interfaces Node Types

What 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
STAFF
Craig Dennis
Treehouse Teacher

Nice 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
Pranjal Agnihotri
4,187 Points

Its sounds confusing it should be named Scene Tree then because it is using Tree Data Structure because Graph is a Data Structure.

That's true, but trees are just a special type of graphs without cycles.

They 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.