# How to generate two sets from distinct points on a sphere, and plot them?

**URL:** https://discourse.julialang.org/t/how-to-generate-two-sets-from-distinct-points-on-a-sphere-and-plot-them/79010
**Category:** General Usage
**Tags:** question, plotting, geometry
**Created:** [April 4, 2022, 3:36pm UTC](https://discourse.julialang.org/t/how-to-generate-two-sets-from-distinct-points-on-a-sphere-and-plot-them/79010 "2022-04-04T15:36:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![OliveiraIgor](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oliveiraigor/32/34638_2.png) [@OliveiraIgor](https://discourse.julialang.org/u/OliveiraIgor)
#### Post date: [April 4, 2022, 3:36pm UTC](https://discourse.julialang.org/t/how-to-generate-two-sets-from-distinct-points-on-a-sphere-and-plot-them/79010/1 "2022-04-04T15:36:21Z")

</div>

I need to apply the PCA at different points of a spherical cap, but I don’t know how to build these sets of different points, I need at least 2 sets.

Here is a picture with the idea of what I need.

![Captura de tela de 2022-04-04 12-37-48](https://global.discourse-cdn.com/julialang/original/3X/6/9/693150b9adfebc4aae9040b88c96bb2a0cc561f4.png)
