Skip to content

Why is the surface normal defined as glm::cross(ptder(0, 1), ptder(1, 0)) instead of the usual glm::cross(ptder(1, 0), ptder(0, 1))? #30

@mckay-w

Description

@mckay-w

Hi, thanks for your great work on tinynurbs!
I noticed that in core/evaluate.h, the surface normal is computed as:
glm::vec<3, T> n = glm::cross(ptder(0, 1), ptder(1, 0));

This is the opposite order from the usual right-hand rule definition, which is typically:
glm::vec<3, T> n = glm::cross(ptder(1, 0), ptder(0, 1));

Q:
Is this reversed order intentional?

  • If so, is it for compatibility with a specific modeling standard, coordinate system (e.g., Y-up vs Z-up), or rendering convention?

If I swap the arguments to follow the conventional Su × Sv order, are there any downstream implications I should be aware of (e.g., in trimming, tessellation, or derivative computation)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions