This is awesome! The only question I have as a new touchdesigner developer, how would you manipulate rotation of the camera or the sphere with mouse drag or other gesture input? My first thought is to translate the mouse vector to a rotation. Are there other ways to do this in TD?
This could probably be cleaned up a bit, but after some trial and error was able to come up with this in python which worked... import numpy as np # latitude lat = 36.8936996 # longitude lon = -82.4881973 # radius your sphere r = 1 # Converting lat/long to cartesian latDeg = np.deg2rad(lat) lonDeg = np.deg2rad(lon) x = r * ((np.cos(latDeg) * np.cos(lonDeg)) * 100) * -1 y = r * ((np.cos(latDeg) * np.sin(lonDeg)) * 100) * -1 z = r * (np.sin(latDeg)) * 100 # print results print(x) print(y) print(z)
This is amazing, and thank you for providing your project files! Awesome tutorial
Got stuck pretty early :/ there's no second option to enable rim lights
thank you for this from Russia! it`s very useful
Excellent thank you!
This is awesome! The only question I have as a new touchdesigner developer, how would you manipulate rotation of the camera or the sphere with mouse drag or other gesture input? My first thought is to translate the mouse vector to a rotation. Are there other ways to do this in TD?
take a look at arcball camera in the palette, its already a tool within TD !
Awesome ! thanks.
any idea where I can get the example files? resource link seems to be dead
Example files are not available. Could someone help with that?
Anyone able to find a good resource for converting latitude longitude to cartesian values?
This could probably be cleaned up a bit, but after some trial and error was able to come up with this in python which worked...
import numpy as np
# latitude
lat = 36.8936996
# longitude
lon = -82.4881973
# radius your sphere
r = 1
# Converting lat/long to cartesian
latDeg = np.deg2rad(lat)
lonDeg = np.deg2rad(lon)
x = r * ((np.cos(latDeg) * np.cos(lonDeg)) * 100) * -1
y = r * ((np.cos(latDeg) * np.sin(lonDeg)) * 100) * -1
z = r * (np.sin(latDeg)) * 100
# print results
print(x)
print(y)
print(z)
love this!
the file is missing
helppppppppppppppppppppppppppppppp