RSS iconTwitter iconFacebook icon

The Trek BBS title image

The Trek BBS statistics

Threads: 135,778
Posts: 5,217,077
Members: 24,216
Currently online: 747
Newest member: momogila

TrekToday headlines

Q Meets NuTrek Crew
By: T'Bonz on Apr 18

Pine In Talks For Drama
By: T'Bonz on Apr 18

New X-Men: Days of Future Past Trailer
By: T'Bonz on Apr 17

Nimoy to Receive Award
By: T'Bonz on Apr 17

Star Trek Special: Flesh and Stone Comic
By: T'Bonz on Apr 16

These Are The Voyages TOS Season Two Book Review
By: T'Bonz on Apr 16

Kirk’s Well Wishes To Kirk
By: T'Bonz on Apr 15

Quinto In New Starz Series
By: T'Bonz on Apr 15

Star Trek: Horizon Film
By: T'Bonz on Apr 14

Star Trek: Fleet Captains Game Expansion
By: T'Bonz on Apr 14


Welcome! The Trek BBS is the number one place to chat about Star Trek with like-minded fans. Please login to see our full range of forums as well as the ability to send and receive private messages, track your favourite topics and of course join in the discussions.

If you are a new visitor, join us for free. If you are an existing member please login below. Note: for members who joined under our old messageboard system, please login with your display name not your login name.


Go Back   The Trek BBS > Lounges & General Chat > Miscellaneous

Miscellaneous Discussion of non-Trek topics.

Reply
 
Thread Tools
Old March 30 2013, 12:34 AM   #1
ThunderAeroI
Rear Admiral
 
ThunderAeroI's Avatar
 
Location: Perpetually being chased by airplanes
Not Homework, just a nerd looking for help

I am working on something not associated with homework and I need some help figuring out how to calculate the points of a graph.

I'd like to have an exponential curve with 72 datapoints where every 8 points a new sinwave starts. The math is way over my head but I am sure my fellow math nerds know how to solve it quickly.

The image below provides you a better idea of what I am thinking of. Don't take the image literally for anything. It is just an example.

__________________
No Where to be found, but everywhere you are - I'll be there looking for ways to save your life.
ThunderAeroI is offline   Reply With Quote
Old March 30 2013, 03:15 AM   #2
B.J.
Rear Admiral
 
B.J.'s Avatar
 
Location: Huntsville, AL, USA
Re: Not Homework, just a nerd looking for help

Simply put, all you'd need to do is add the two different parts of it together. The first part would be your sine function, and the second part your exponential curve. For the sine curve to repeat every 8 points, all you'd need is x={0,1,2,3....}, y=x*sin(2*pi/8).
__________________
B.J. --- bj-o23.deviantart.com
B.J. is offline   Reply With Quote
Old March 30 2013, 03:38 AM   #3
ThunderAeroI
Rear Admiral
 
ThunderAeroI's Avatar
 
Location: Perpetually being chased by airplanes
Re: Not Homework, just a nerd looking for help

B.J. wrote: View Post
Simply put, all you'd need to do is add the two different parts of it together. The first part would be your sine function, and the second part your exponential curve. For the sine curve to repeat every 8 points, all you'd need is x={0,1,2,3....}, y=x*sin(2*pi/8).
Thank you for your reply; however, I am unable to make your equation result in the desired effect. What it produces is a linear line with no cyclical pattern.
__________________
No Where to be found, but everywhere you are - I'll be there looking for ways to save your life.
ThunderAeroI is offline   Reply With Quote
Old March 30 2013, 06:29 AM   #4
Miss Chicken
Little three legged cat with attitude
 
Miss Chicken's Avatar
 
Location: Howrah, Hobart, Tasmania
Re: Not Homework, just a nerd looking for help

Sorry posted in wrong thread and I am unable to help you
Miss Chicken is offline   Reply With Quote
Old March 30 2013, 07:14 AM   #5
B.J.
Rear Admiral
 
B.J.'s Avatar
 
Location: Huntsville, AL, USA
Re: Not Homework, just a nerd looking for help

ThunderAeroI wrote: View Post
B.J. wrote: View Post
Simply put, all you'd need to do is add the two different parts of it together. The first part would be your sine function, and the second part your exponential curve. For the sine curve to repeat every 8 points, all you'd need is x={0,1,2,3....}, y=x*sin(2*pi/8).
Thank you for your reply; however, I am unable to make your equation result in the desired effect. What it produces is a linear line with no cyclical pattern.
Whoops! I meant to type y=sin(x*2*pi/8).
__________________
B.J. --- bj-o23.deviantart.com
B.J. is offline   Reply With Quote
Old March 30 2013, 12:00 PM   #6
Yoda
Rear Admiral
 
Yoda's Avatar
 
Location: San Diego
Re: Not Homework, just a nerd looking for help

^I don't think that's quite it either. That's more or less a regular looking sine wave.

Anyway if I'm understanding the question. I agree about the basic idea, that is exponential (say x^2) plus sine wave (sin (x)). That doesn't lead to much of a nice looking line though. Just messing around with the values on a graph, (x/5)^1.5+sin(2x) looks decent enough to me.

It shouldn't be hard to get points from there. Sine has a period of 2pi, and since i'm using 2x inside of sin, that means the period is effectively just pi. So to get it to cycle every 8 data points, make x = 0, 1*pi/8, 2*pi/8... anyway solving all those to get the data points is an easy job for a spreadsheet so I come up with:

Code:
0	0
0.3926990817	0.7291175302
0.7853981634	1.0622557996
1.1780972451	0.8214779881
1.5707963268	0.1760859923
1.9634954085	-0.4610191258
2.3561944902	-0.676509376
2.7488935719	-0.2994620043
3.1415926536	0.4980463969
3.5342917353	1.3013970052
3.926990817	1.6960409996
4.3196898987	1.5101221362
4.7123889804	0.9149696554
5.1050880621	0.3245847142
5.4977871438	0.1529935441
5.8904862255	0.5716021856
6.2831853072	1.4086879383
6.6758843889	2.2499017152
7.0685834706	2.6809065895
7.4612825523	2.5300167649
7.853981634	1.9687012432
8.2466807157	1.4110776136
8.6393797974	1.2712704116
9.0320788791	1.7207696326
9.4247779608	2.5879249918
9.8174770425	3.4584504107
10.2101761242	3.9180642099
10.6028752059	3.7951293683
10.9955742876	3.2611582147
11.3882733693	2.7303070404
11.780972451	2.6167351264
12.1736715327	3.0919638054
12.5663706144	3.984371175
12.9590696961	4.8796969634
13.3517687778	5.3636830392
13.7444678595	5.2647139396
14.1371669412	4.7543217918
14.5298660229	4.2466811203
14.9225651046	4.1559680438
15.3152641863	4.6537194821
15.7079632679	5.5683279968
16.1006623496	6.4855467673
16.4933614313	6.9911301974
16.886060513	6.9134745293
17.2787595947	6.4241228398
17.6714586764	5.9372599147
18.0641577581	5.8670715044
18.4568568398	6.3851035845
18.8495559215	7.3197572435
19.2422550032	8.2567937006
19.6349540849	8.7819749512
20.0276531666	8.7237044151
20.4203522483	8.2535319631
20.81305133	7.7856488204
21.2057504117	7.7342468472
21.5984494934	8.2708778224
21.9911485751	9.2239483526
22.3838476568	10.1792249093
22.7765467385	10.7224744918
23.1692458202	10.6821052918
23.5619449019	10.2296717345
23.9546439836	9.7793693959
24.3473430653	9.7453942958
24.740042147	10.2993021934
25.1327412287	11.2695035065
25.5254403104	12.2417683587
25.9181393921	12.8018672519
26.3108384738	12.7782117386
26.7035375555	12.3423594718
27.0962366372	11.9085091285
27.4889357189	11.8908597108
27.8816348006	12.4609698467
__________________
Yoda is offline   Reply With Quote
Old March 30 2013, 02:20 PM   #7
ThunderAeroI
Rear Admiral
 
ThunderAeroI's Avatar
 
Location: Perpetually being chased by airplanes
Re: Not Homework, just a nerd looking for help

Yoda wrote: View Post
^I don't think that's quite it either. That's more or less a regular looking sine wave.

Anyway if I'm understanding the question. I agree about the basic idea, that is exponential (say x^2) plus sine wave (sin (x)). That doesn't lead to much of a nice looking line though. Just messing around with the values on a graph, (x/5)^1.5+sin(2x) looks decent enough to me.

It shouldn't be hard to get points from there. Sine has a period of 2pi, and since i'm using 2x inside of sin, that means the period is effectively just pi. So to get it to cycle every 8 data points, make x = 0, 1*pi/8, 2*pi/8... anyway solving all those to get the data points is an easy job for a spreadsheet so I come up with:

Code:
0	0
0.3926990817	0.7291175302
0.7853981634	1.0622557996
1.1780972451	0.8214779881
1.5707963268	0.1760859923
1.9634954085	-0.4610191258
2.3561944902	-0.676509376
2.7488935719	-0.2994620043
3.1415926536	0.4980463969
3.5342917353	1.3013970052
3.926990817	1.6960409996
4.3196898987	1.5101221362
4.7123889804	0.9149696554
5.1050880621	0.3245847142
5.4977871438	0.1529935441
5.8904862255	0.5716021856
6.2831853072	1.4086879383
6.6758843889	2.2499017152
7.0685834706	2.6809065895
7.4612825523	2.5300167649
7.853981634	1.9687012432
8.2466807157	1.4110776136
8.6393797974	1.2712704116
9.0320788791	1.7207696326
9.4247779608	2.5879249918
9.8174770425	3.4584504107
10.2101761242	3.9180642099
10.6028752059	3.7951293683
10.9955742876	3.2611582147
11.3882733693	2.7303070404
11.780972451	2.6167351264
12.1736715327	3.0919638054
12.5663706144	3.984371175
12.9590696961	4.8796969634
13.3517687778	5.3636830392
13.7444678595	5.2647139396
14.1371669412	4.7543217918
14.5298660229	4.2466811203
14.9225651046	4.1559680438
15.3152641863	4.6537194821
15.7079632679	5.5683279968
16.1006623496	6.4855467673
16.4933614313	6.9911301974
16.886060513	6.9134745293
17.2787595947	6.4241228398
17.6714586764	5.9372599147
18.0641577581	5.8670715044
18.4568568398	6.3851035845
18.8495559215	7.3197572435
19.2422550032	8.2567937006
19.6349540849	8.7819749512
20.0276531666	8.7237044151
20.4203522483	8.2535319631
20.81305133	7.7856488204
21.2057504117	7.7342468472
21.5984494934	8.2708778224
21.9911485751	9.2239483526
22.3838476568	10.1792249093
22.7765467385	10.7224744918
23.1692458202	10.6821052918
23.5619449019	10.2296717345
23.9546439836	9.7793693959
24.3473430653	9.7453942958
24.740042147	10.2993021934
25.1327412287	11.2695035065
25.5254403104	12.2417683587
25.9181393921	12.8018672519
26.3108384738	12.7782117386
26.7035375555	12.3423594718
27.0962366372	11.9085091285
27.4889357189	11.8908597108
27.8816348006	12.4609698467
Thats it! I was able to configure the variables a little to work like I wanted.

I ended with: Y=(X/16)^2+COS(7*X)

Thank you.
__________________
No Where to be found, but everywhere you are - I'll be there looking for ways to save your life.
ThunderAeroI is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +1. The time now is 05:51 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
FireFox 2+ or Internet Explorer 7+ highly recommended.