How to generate 3D clusters that are really only 2D? How to construct a data set in three dimensional space, containing five classes (small overlapping is allowed but not advisable) clusters  such that only two dimensions possess significant discriminatory power?
 A: Does this count as a solution? I define the clusters by defining their centers in two dimensions and randomly make points around them. The third dimension consists of random numbers and therefore should not add anything to the cluster structure.
#centers of 5 clusters

center.x <- c(10, 20, 30, 40, 50)
center.y <- c(10, 20, 30, 40, 50)

x <- c(replicate(50, jitter(center.x[1])),
       replicate(50, jitter(center.x[2])),
       replicate(50, jitter(center.x[3])),
       replicate(50, jitter(center.x[4])),
       replicate(50, jitter(center.x[5])))

y <- c(replicate(50, jitter(center.y[1])),
       replicate(50, jitter(center.y[2])),
       replicate(50, jitter(center.y[3])),
       replicate(50, jitter(center.y[4])),
       replicate(50, jitter(center.y[5])))

z <- runif(5*50)

collected <- data.frame(x=x, y=y, z=z)

# 2D plot x and y
plot(x,y)

# cluster structure in all 3 dimensions
plot(hclust(dist(collected)))

# cluster structure in x and y dimension
plot(hclust(dist(collected[,c("x", "y")])))

You could make the 5 cluster structure even more pronounced by choosing centers that are not in a row but on a circle of the x-y-plane.
