Skip to contents

Points sampled from a trefoil knot shape, from "How to Use t-SNE Effectively".

Usage

trefoil_data(n)

Arguments

n

Number of points to sample.

Value

Data frame with coordinates in the x, y, z columns, and color in the color column.

Details

Creates a 3D dataset where points are uniformly sampled from a trefoil knot. Points are colored based on mapping the angle parameter values used to generate the knot coordinates to a rainbow color scheme.

Examples

df <- trefoil_data(n = 50)