Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 26th Sep 2012 04:50
So far I've found this a nightmare, because of there's so many different scale factor at different steps of the whole scale. For instance I have no clue the maths behind scaling steps at or towards mouse point due to scaling takes focus of the mouse point. Scaling the guidelines plus drawing with offset since the drawing doesn't start at the left but could start in the middle and everything offset from that point.

If anyone could give me some hints and or examples around scaling that would be awesome!
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 27th Sep 2012 03:23
http://forum.thegamecreators.com/?m=forum_view&t=196700&b=1

This should help...

Try using the search boxes at the bottom...

I think I should make a request to have them moved to the top of the forum...

Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 27th Sep 2012 06:25 Edited at: 27th Sep 2012 06:26
Haha, I like that you linked me to my own thread. Because it was locked I had to make a new one. But nothing in that thread helped me with this.

Also the Search function is far to specific (and in need of updating) and due to people not naming their threads correctly it's almost impossible to find something. So I google search DBP instead, far more hits.

And believe me, I've searched. It may be possible that no one has made something like this in DBP.
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 27th Sep 2012 09:45 Edited at: 3rd Oct 2012 20:41
Hhahaha was it yours?

I was too tired to notice I guess...

Hmm yeah it is a shame about it using titles mainly but I am pretty sure the forum or site search uses content...

Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 27th Sep 2012 14:23
Google is pretty good for searching forums.

Google: site:forum.thegamecreators.com dbpro forums: <your subject here>

But more importantly this Scaling thing... still have no clue guys
The Weeping Corpse
14
Years of Service
User Offline
Joined: 19th Sep 2011
Location: United Kingdom
Posted: 28th Sep 2012 19:18
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 28th Sep 2012 21:21 Edited at: 28th Sep 2012 21:47
I use 2D transformation matrices for rotations (well vector equivalent really since there faster), but thats simple because I know where I'm drawing stuff. But scale in this way is completely different because even if I've got all the maths done, I have no clue how to implement it with multiple scale factors (or steps like LOD of the graph).

But I'm going to try some tests with the mouse first. If I can find where the mouse is I might be able to work out how scales work. So maybe someone could help me with the maths. How would you retrieve the scaled x/y from the centre of the graph at the point of the mouse?

Technically you could say I'm Zooming about an arbitrary point rather than scaling.
The Weeping Corpse
14
Years of Service
User Offline
Joined: 19th Sep 2011
Location: United Kingdom
Posted: 29th Sep 2012 14:42
ok, I think I understand what you mean by steps of graph LOD

when you zoom out of the graph you would end up with an averaged version of the input data on screen. This means you would lose any peaks and troughs in the data?

you would need a function that takes the raw graph data for a section of the graph and returns a zoom'd version

min data point
average graph data
max data point

---------------------------------

Just been messing with audacity, zooming in and out of waveform graphs and I think thats how it works. The zoom only works on factors of 2, for example 1:1 2:1 4:1 8:1 so it must be throwing every second data item away, but keeping the highest or lowest data to maintain the peaks and troughs.

Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 30th Sep 2012 19:41 Edited at: 30th Sep 2012 19:42
Audacity Zooms from a fixed point, from the left. I need to zoom from an arbitrary point off of a fixed point and luckily I was able to make something after looking at one of Neuro Fuzzy's (genius) snippets and this is exactly what I need but one thing is still missing. I need to Zoom not from the centre of the screen but rather the mouse point, the math on this is confusing me but I think it will hit me at some point... I hope.



Note: this requires Advanced2d plugin cause trying to display only a few lines with stock DBP commands is ridiculous.
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 1st Oct 2012 15:13 Edited at: 2nd Oct 2012 08:42
So now I've got a scalable graph, I need to add the guides at the bottom and left side (the bit with the numbers on). The question is does anyone have any idea how to do it?

Update:
I figured I could workout the left/to/right/bottom position on the screen and work out every nth value between them based on scale and draw the grid. But I'm having trouble working out the actual LOD part, since I need to scale from a small value 0.001 to a very large number in the millions. Have no clue how to implement scale steps.
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 3rd Oct 2012 01:42 Edited at: 3rd Oct 2012 01:47
Here's what I've got so far for the Curve Editor:


Just Linear Interpolation at the mo, will add Cubic and Bezier.
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 3rd Oct 2012 18:54
Really getting somewhere with this now:
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 3rd Oct 2012 20:04
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 3rd Oct 2012 20:41
nice!

Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 3rd Oct 2012 20:55 Edited at: 3rd Oct 2012 20:55
Cheers. What I need to do now is to be able to display more than one curve due to if you need to match things up (easy). Also need to be able to edit points (easier) and of course different curve types (not so easy).

Also the GUI elements (tools) and object transform selection panel. This should be fun
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 2nd Nov 2012 23:22
So guy's. Looking at the core zooming function:


How would you zoom to mouse point?

Login to post a reply

Server time is: 2026-07-10 11:52:44
Your offset time is: 2026-07-10 11:52:44