eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.47k stars 1.4k forks source link

refine airplane shape #12329

Open namdre opened 1 year ago

namdre commented 1 year ago

Current shape (#12314) is only an outline and this is hard to click on. Fortunately, there is a rather simple way to obtain high fidelity transformations of raster graphics (i.e. https://iconsplace.com/wp-content/uploads/_icons/000000/256/png/boeing-767-icon-256.png):

theDivj commented 1 year ago

fyi - I have a triangle_strip version of the aircraft that may be of use:

static const double vehiclePoly_aircraft[] = {0.633,-0.500,0.609,-0.465,0.563,-0.460,0.517,-0.168,0.413,-0.156,0.509,-0.053,0.509,0.053,0.413,-0.156,0.413,0.156,0.385,-0.101,0.385,0.101,0.354,-0.058,0.354,0.058,0.109,-0.050,0.109,0.050,0,-0.003,0,0.003,0,0.003,0.633,0.500,0.633,0.500,0.609,0.465,0.563,0.460,0.517,0.168,0.413,0.156,0.509,0.053,0.385,0.101,0.326,0.158,0.326,0.108,0.413,0.156,0.385,0.101,0.509,0.053,0.509,-0.053,0.761,0.043,0.761,-0.043,0.830,0.030,0.830,-0.030,0.952,-0.196,0.933,-0.196,0.907,-0.008,0.830,0.030,0.933,0.196,0.952,0.196,0.907,0.008,0.830,0.030,0.907,-0.008,1.000,0.003,0.907,0.008,0.354,-0.058,0.509,-0.053,0.413,-0.156,0.385,-0.101,0.326,-0.158,0.326,-0.108,0.385,-0.101, -10000};

This is a little more 'angular' than the current outline but does improve the clickability. Also - the shape drawing code acquired a redundant color reduction (line 514 of the current GUIBaseVehicleHelper.cpp) - that shouldn't be there - sorry!

wrt the aircraft 'lights', I guess you are aware that they follow the same pattern as 'ships' - ie blinking green/red to starboard/port and white navigation light at rear - landing lights never being used after landing - so not required?

namdre commented 1 year ago

@angelobanse I think it's pretty good already (and in keeping with the other simple-shapes). A nice touch-up would be to add the customary black cockpit window and may the engines in a darker hue (-:

theDivj commented 1 year ago

Re darker hue: These are separated triangle_strips for the aircraft and engines:

static const double vehiclePoly_aircraft[] = {0.633,-0.500,0.609,-0.465,0.563,-0.460,0.517,-0.168,0.413,-0.156,0.509,-0.053,0.509,0.053,0.413,-0.156,0.413,0.156,0.385,-0.101,0.385,0.101,0.354,-0.058,0.354,0.058,0.109,-0.050,0.109,0.050,0,-0.003,0,0.003,0,0.003,0.633,0.500,0.633,0.500,0.609,0.465,0.563,0.460,0.517,0.168,0.385,0.101,0.509,0.053,0.509,-0.053,0.761,0.043,0.761,-0.043,0.830,0.030,0.830,-0.030,0.952,-0.196,0.933,-0.196,0.907,-0.008,0.830,0.030,0.933,0.196,0.952,0.196,0.907,0.008,0.830,0.030,0.907,-0.008,1.000,0.003,0.907,0.008, -10000};

static const double vehiclePoly_aircraftEngines[] = {0.326,-0.158,0.413,-0.156,0.326,-0.108,0.385,-0.101,0.385,-0.101,0.385,0.101,0.385,0.101,0.326,0.108,0.413,0.156,0.326,0.158, -10000};

Thanks for adding the aircraft - am having way too much fun modelling a day's arrivals/departures at Liverpool!