This content has been marked as final.
Show 7 replies

Sine curves in sketch
Dan Riffell Oct 18, 2007 12:35 PM (in response to Ranga Narasimhan)If you're asking if you can use an equation to drive a spline, thenthe answer is no. You need to use your equation tolocate points on a graph then plot the points in SW. Then youwill have to use the curve through points command.
This would be a great enhancement request.
Sine curves in sketch
Mahir Abrahim Oct 18, 2007 4:35 PM (in response to Dan Riffell)Try this macro I wrote. It's done well by me.
Sine curves in sketch
Ranga Narasimhan Oct 19, 2007 8:19 AM (in response to Mahir Abrahim)Hi Mahir,
Thats was really great. I played little with it. Was cool.
Your macro can handle parametric equations very well. But do you have something for implicit (or) explicit equations like
y = f(x) (or) f(x,y)=0.
Now, if i have to use explicit/implicit eqns, first i have to convert them into parametric eqns and then use them which sometimes confuses me
Once again, great job done!!!
Thanks
Sine curves in sketch
Mahir Abrahim Oct 19, 2007 2:09 PM (in response to Ranga Narasimhan)Thanks, Ranga. The macro won't automatically handle implicitfunctions of the form f(x,y)=c. It will only plot functions with a1 to 1 mapping in 3D space, i.e. the result of the functionevaluation must be a single point, and no two points can overlap.This boils down to only plotting curves, not surfaces (likef(x,y)=c). Also, no selfintersecting curves. However, if you havea function like x^2 + y^2 = 1, you can easily decompose itparametrically into x=2*t1, y=sqrt(1x^2), z=0. This would giveyou half the circle, while y=sqrt(1x^2) would plot the otherhalf. Another way would be r=1, th=radians(360)*t, z=0. It would benice if FuncPlot handled implicit functions, but I'm not that gooda programmer and unfortunately don't have that much free time However, keep in mind that Excel function can be used. So if youwanted to create a curve that was C0, but not C1, you could use anIF() command that gave different results for z based on the valuesof x,y,t. Anyhow... have fun.Mahir




Sine curves in sketch
John Burrill Oct 19, 2007 5:57 PM (in response to Ranga Narasimhan)If you create a helix with a pitch of 2Pi and a Radius of 1 and then project the profile view of that onto a sketch plane, would that not produce a sine wave?
(see attached)
Now, I don't know how useful it would be, but there it is.
John
sine_wave3.jpg 52.8 KB

sine_wave2.jpg 64.3 KB

sine_wave1.jpg 43.8 KB

Sine curves in sketch
Mahir Abrahim Oct 19, 2007 6:40 PM (in response to John Burrill)Good observation, John. Assuming SW isn't using some sortof internal spline interpolation, that's a good way to get an exactsinusoidal wave that will remain parametric in case you want tochange it later.
for y = A*cos(k*Theta), 0<=Theta<=L
A = amplitude
k = number of cycles per 2PI radians
L = max angle
The helix parameters should be
profile circle diameter = 2*A
and pitch & revolution
p = 2PI/k
n = L/p
or height and revolution
H = height = L
n = L*k/2PI
or height and pitch
H = L
p = 2PI/k
Mahir
Sine curves in sketch
Ranga Narasimhan Oct 22, 2007 11:01 AM (in response to Mahir Abrahim)Hi John & Mahir,
Thanks all, now i able to create to create sine curve . I hope anyway the Bspline approximation done by SW would hold good for a sine curve,
thx

