Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Apr 18, 2024 11:27 pm
All times are UTC + 0
Suggestion: Trapeziods
Moderators: stucuk
Post new topic   Reply to topic Page 1 of 1 [28 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
meselfs
Grenadier


Joined: 12 Dec 2003
Location: Oregon, USA

PostPosted: Sun Aug 01, 2004 9:20 pm    Post subject:  Suggestion: Trapeziods Reply with quote  Mark this post and the followings unread

When I was 10 years old, the game was SimCity 2000 (actually my favorite was Keen 5, but nevermind).

I remember when I purchased this game, it came with something called the "Urban Renewal Kit", it was basically a modding tool which, among other things, allowed you to draw buildings in 2D.

This was identical to Paint in most ways, with one big exception: you could draw these trapezoids, which represented a right or left wall on a building.



My suggestion is to add something like this to OS SHP (even though I scoff the idea of 2D SHP making, no matter how good the software is). I think that if combined with C&P it could do wonders for the people who don't use 3D.

You could add these two features alongside:

Allowing the user to define two angles representing the direction a 3D square plane is facing.

Allowing the user to put a texture on it.



What do you think? If you guaruntee that you can implement it, I'll write a little C program which demonstrates this (minus the texture part), and give the src so you can copy the math (which I'll figure out Wink ).

_________________
My 3D to SHP tutorial


Back to top
View user's profile Send private message Skype Account
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Sun Aug 01, 2004 9:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

I'll try it out...although I'll still have to think about an algorithm for that because I dont know the exact formula to generate it...



Edit: Maybe it would be generated in the following way:

-> User clicks in the button (duh)
-> User creates a square in the screen and clicks to shape the original square
-> Then, user set the base width...


Is there a better way? Or just... how programs usually deal with it?

_________________


Mods, Mods Support, Public Researchs, Map Archives, Tutorials, A Friendly Community and much more. Check it out now!

Back to top
View user's profile Send private message Visit poster's website Skype Account
meselfs
Grenadier


Joined: 12 Dec 2003
Location: Oregon, USA

PostPosted: Sun Aug 01, 2004 9:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

What I have in mind is the user clicking one corner then the next, and entering angles (graphically maybe?) elsewhere prior to that.

Well, if you can tell me that you'll at least probably do it, I'll make C program to demonstrate, and I'll work out all the math. Can't do it right now, but please tell me now...

_________________
My 3D to SHP tutorial


Back to top
View user's profile Send private message Skype Account
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Sun Aug 01, 2004 10:18 pm    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
What I have in mind is the user clicking one corner then the next, and entering angles (graphically maybe?) elsewhere prior to that.


- I prefer the "What you get is what you see" way... although an option to enter angles can also be interesting, if you wanna make things "perfect".

Quote:
Well, if you can tell me that you'll at least probably do it, I'll make C program to demonstrate, and I'll work out all the math. Can't do it right now, but please tell me now...


- I'll do it. But... since the next days I have some tests (my period in both unis is almost over), I'll probably work it in the weekend or maybe a bit before. Trapezoid is an interesting option.

_________________


Mods, Mods Support, Public Researchs, Map Archives, Tutorials, A Friendly Community and much more. Check it out now!

Back to top
View user's profile Send private message Visit poster's website Skype Account
Mike
Commander


Joined: 11 Jan 2003
Location: Netherlands

PostPosted: Sun Aug 01, 2004 10:19 pm    Post subject: Reply with quote  Mark this post and the followings unread

Banshee wrote:
Quote:
What I have in mind is the user clicking one corner then the next, and entering angles (graphically maybe?) elsewhere prior to that.


- I prefer the "What you get is what you see" way... although an option to enter angles can also be interesting, if you wanna make things "perfect".


How about what you SEE is what you GET Wink

_________________
Please, read the signature rules of the forum.

Back to top
View user's profile Send private message Skype Account
meselfs
Grenadier


Joined: 12 Dec 2003
Location: Oregon, USA

PostPosted: Sun Aug 01, 2004 10:21 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ok Banshee. I'll get to work and sooner or later I'll post it here.


Sorry I posted in wrong forum, btw.

_________________
My 3D to SHP tutorial


Back to top
View user's profile Send private message Skype Account
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Sun Aug 01, 2004 10:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

MyTrust wrote:
Banshee wrote:
Quote:
What I have in mind is the user clicking one corner then the next, and entering angles (graphically maybe?) elsewhere prior to that.


- I prefer the "What you get is what you see" way... although an option to enter angles can also be interesting, if you wanna make things "perfect".


How about what you SEE is what you GET Wink


Ops :p... just minor details Wink.

Back to top
View user's profile Send private message Visit poster's website Skype Account
meselfs
Grenadier


Joined: 12 Dec 2003
Location: Oregon, USA

PostPosted: Fri Aug 06, 2004 3:17 am    Post subject: Reply with quote  Mark this post and the followings unread

Sorry for taking so long.
Everything is worked out except the math... it's worked out but doesn't work atm. Hopefully I'll finish tommorow, if not then the next day.

_________________
My 3D to SHP tutorial


Back to top
View user's profile Send private message Skype Account
meselfs
Grenadier


Joined: 12 Dec 2003
Location: Oregon, USA

PostPosted: Sat Aug 07, 2004 2:13 am    Post subject: Reply with quote  Mark this post and the followings unread

Well, it's getting much more complicated then I first thought, but I did quite a bit today and am confident that I'll be done tommorow... stay tuned.

_________________
My 3D to SHP tutorial


Back to top
View user's profile Send private message Skype Account
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Sat Aug 07, 2004 2:24 am    Post subject: Reply with quote  Mark this post and the followings unread


_________________


Mods, Mods Support, Public Researchs, Map Archives, Tutorials, A Friendly Community and much more. Check it out now!

Back to top
View user's profile Send private message Visit poster's website Skype Account
meselfs
Grenadier


Joined: 12 Dec 2003
Location: Oregon, USA

PostPosted: Sat Aug 07, 2004 7:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

Good... we're all busy :-<

Well, here's an SS. All I gotta do now is add math for tilting the wall. The math for the direction of the wall & it's dimensions is all done and works perfectly.



15362548.jpg
 Description:
 Filesize:  96.17 KB
 Viewed:  11136 Time(s)

15362548.jpg



_________________
My 3D to SHP tutorial


Back to top
View user's profile Send private message Skype Account
meselfs
Grenadier


Joined: 12 Dec 2003
Location: Oregon, USA

PostPosted: Sun Aug 08, 2004 11:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

K...

I'm not done and there's no chance I can finish later today. I thought tilt would be easy since I'd ficgured out direction fully, but it didn't turn out that way...

Maybe I won't give any more dates. I'll just say it'll be finished in the future.



I did do this much from the past post: previously, the cursor moved in a special way when you were drawing a wall. This made it easier, but unfortunately it wouldn't have a chance of working with a mouse... so I cooked up some new math and made it so that only a cursor's coords, the initial click, and the angles are needed to create the object.

I also made it so that backspace erases the previous object.

_________________
My 3D to SHP tutorial


Back to top
View user's profile Send private message Skype Account
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Mon Aug 09, 2004 12:27 am    Post subject: Reply with quote  Mark this post and the followings unread

I'm doing my part and I'm trying to sort the save thing... I hope to have it fixed soon... except that I still have no idea on how to deal with the "invalid pointer operation". When I get this fixed, I'll add a bunch of stuff to the program. I'll probably redesign the menu a bit...

_________________


Mods, Mods Support, Public Researchs, Map Archives, Tutorials, A Friendly Community and much more. Check it out now!

Back to top
View user's profile Send private message Visit poster's website Skype Account
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Fri Aug 13, 2004 5:33 am    Post subject: Reply with quote  Mark this post and the followings unread

Any progress on the trapezoid?

_________________


Mods, Mods Support, Public Researchs, Map Archives, Tutorials, A Friendly Community and much more. Check it out now!

Back to top
View user's profile Send private message Visit poster's website Skype Account
meselfs
Grenadier


Joined: 12 Dec 2003
Location: Oregon, USA

PostPosted: Fri Aug 13, 2004 10:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

Been reading up on linear transformations, and I daydream about how I'd do it once in a while. I can't do much on weekdays, so don't expect anything...

...but the weekend begins tommorow.

_________________
My 3D to SHP tutorial


Back to top
View user's profile Send private message Skype Account
mavrick
AA Infantry


Joined: 19 Aug 2002
Location: United Kingdom

PostPosted: Sat Aug 14, 2004 12:23 am    Post subject: Reply with quote  Mark this post and the followings unread

i remember the editor your speaking of, it's basicly like the old vxl editor.. do each dimension in a 2d format.

Back to top
View user's profile Send private message Skype Account
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Sat Aug 14, 2004 12:50 am    Post subject: Reply with quote  Mark this post and the followings unread

Trapezoids are analicts geometry, not linear transformations.

_________________


Mods, Mods Support, Public Researchs, Map Archives, Tutorials, A Friendly Community and much more. Check it out now!

Back to top
View user's profile Send private message Visit poster's website Skype Account
mavrick
AA Infantry


Joined: 19 Aug 2002
Location: United Kingdom

PostPosted: Sat Aug 14, 2004 10:28 am    Post subject: Reply with quote  Mark this post and the followings unread

it took graphic design Smile i understand, n' too figure out the angles, it''s 30% from the base line...

Back to top
View user's profile Send private message Skype Account
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Sat Aug 14, 2004 4:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

No mav, there is no definite angle for the any sides, but the sum of the angles from all the sides must be 360'

_________________


Mods, Mods Support, Public Researchs, Map Archives, Tutorials, A Friendly Community and much more. Check it out now!

Back to top
View user's profile Send private message Visit poster's website Skype Account
meselfs
Grenadier


Joined: 12 Dec 2003
Location: Oregon, USA

PostPosted: Sat Aug 14, 2004 7:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

Banshee wrote:
Trapezoids are analicts geometry, not linear transformations.


Yes but the concept comes from 3D quads, and to display that on a 2d canvas you must use a transformation, also called a projection to a plane.


Here's What I have so far concerning that, and as you can see it's close but still screwed up. Rename to exe from zip... why is exe not allowed, btw?



3Dto2D.exe.zip
 Description:

Download
 Filename:  3Dto2D.exe.zip
 Filesize:  27 KB
 Downloaded:  406 Time(s)


_________________
My 3D to SHP tutorial


Back to top
View user's profile Send private message Skype Account
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Sat Aug 14, 2004 8:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

You are making a new shape, not transforming an existing shape. You could even make a square and get the projection to transform it into a trapezoid, but if you do it in the way you think, you will be transforming everything inside this "square" into a trapezoid, which is wrong for a tool like rectangle, elipse and trapezoid.

_________________


Mods, Mods Support, Public Researchs, Map Archives, Tutorials, A Friendly Community and much more. Check it out now!

Back to top
View user's profile Send private message Visit poster's website Skype Account
meselfs
Grenadier


Joined: 12 Dec 2003
Location: Oregon, USA

PostPosted: Sat Aug 14, 2004 8:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

Banshee wrote:
You are making a new shape, not transforming an existing shape. You could even make a square and get the projection to transform it into a trapezoid, but if you do it in the way you think, you will be transforming everything inside this "square" into a trapezoid, which is wrong for a tool like rectangle, elipse and trapezoid.


It's wrong? Maybe... but if I don't do it this way then the input angles would refer to the angles made between drawn lines and the 2d x or y axis.
But if you projet the 3D quad to a 2D viewing plane, you get to visualize the quad as a 3D object, and define the angle it makes with an xy plane and a yz plane(the yz plane part is done).

All of the 3D is handled outside of the code on pencil, so you need not worry about the code processing 3D coords.

Anyway, I got this thing working perfectly. For RA2 camera, adjust Rx to 30, and Ry to -135.

Here's the transformation equation (you don't need it... I'm just posting it anyway):

2D(rx,ry,x,y,z) = <x*cos(ry) - y*sin(ry),(x*sin(ry) + y*cos(ry))*sin(rx) + z*cos(rx)>

some sort of rz variable could be introduced, and it would be pretty easy, but it's totally irrelevant.



3Dto2D.exe.zip
 Description:

Download
 Filename:  3Dto2D.exe.zip
 Filesize:  27.5 KB
 Downloaded:  378 Time(s)


_________________
My 3D to SHP tutorial


Back to top
View user's profile Send private message Skype Account
meselfs
Grenadier


Joined: 12 Dec 2003
Location: Oregon, USA

PostPosted: Sun Aug 15, 2004 2:42 am    Post subject: Reply with quote  Mark this post and the followings unread

Alright, it's completely done Very Happy.

See attachement, src included.

Banshee, I think you're doomed to ask questions, please do not hesitate.



11104080.jpg
 Description:
 Filesize:  91.26 KB
 Viewed:  11063 Time(s)

11104080.jpg



Trapezoids.zip
 Description:

Download
 Filename:  Trapezoids.zip
 Filesize:  23.43 KB
 Downloaded:  358 Time(s)


_________________
My 3D to SHP tutorial


Back to top
View user's profile Send private message Skype Account
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Sun Aug 15, 2004 3:20 am    Post subject: Reply with quote  Mark this post and the followings unread

Interesting... but this makes "rectangle" type of pictures. It doesn't make trapezoids...

_________________


Mods, Mods Support, Public Researchs, Map Archives, Tutorials, A Friendly Community and much more. Check it out now!

Back to top
View user's profile Send private message Visit poster's website Skype Account
Clazzy
Karma Police


Joined: 26 Nov 2002
Location: Algae Colony On Mars

PostPosted: Sun Aug 15, 2004 10:34 am    Post subject: Reply with quote  Mark this post and the followings unread

No, it's slightly different. Rectangles all have 90 degree angles, these are effectively parallelograms.

_________________
Quote:
This is sexier than what this forum was supposed to tolerate. - Banshee

Back to top
View user's profile Send private message
meselfs
Grenadier


Joined: 12 Dec 2003
Location: Oregon, USA

PostPosted: Sun Aug 15, 2004 6:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

Well, whichever. It makes wireframing easier. I can recompile it with "Wireframing Tool" as the tiltle, if you wnat #Tongue.

In a 3D sense, they're rectangles. Projected onto a 2D display, I just call them quads.

_________________
My 3D to SHP tutorial


Back to top
View user's profile Send private message Skype Account
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Sun Aug 15, 2004 8:24 pm    Post subject: Reply with quote  Mark this post and the followings unread

Clazzy wrote:
No, it's slightly different. Rectangles all have 90 degree angles, these are effectively parallelograms.


Thus the reason I used rectangle between ""... I forgot the word paralelograms in the moment #Tongue.

Back to top
View user's profile Send private message Visit poster's website Skype Account
mavrick
AA Infantry


Joined: 19 Aug 2002
Location: United Kingdom

PostPosted: Mon Aug 16, 2004 3:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

too get a shape to look at that angle, it's 30 degrees, i forget the name of it, but it begins with C, n' it's a drawing technique.

Back to top
View user's profile Send private message Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [28 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.2088s ][ Queries: 15 (0.0128s) ][ Debug on ]